Spaces:
Running
Running
Update index.html
Browse files- index.html +88 -15
index.html
CHANGED
|
@@ -1,19 +1,92 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
|
|
|
|
|
|
| 17 |
</div>
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<title>Decision Making Tool</title>
|
| 5 |
+
<style>
|
| 6 |
+
#slider {
|
| 7 |
+
width: 300px;
|
| 8 |
+
}
|
| 9 |
+
</style>
|
| 10 |
+
</head>
|
| 11 |
+
<body>
|
| 12 |
+
<h1>Decision Making Tool</h1>
|
| 13 |
+
<p>Enter your options and assign a weight to each option using the slider.</p>
|
| 14 |
+
<form>
|
| 15 |
+
<div>
|
| 16 |
+
<label for="option1">Option 1:</label>
|
| 17 |
+
<input type="text" id="option1">
|
| 18 |
+
<input type="range" id="slider1" min="1" max="10" step="1" value="5">
|
| 19 |
</div>
|
| 20 |
+
<div>
|
| 21 |
+
<label for="option2">Option 2:</label>
|
| 22 |
+
<input type="text" id="option2">
|
| 23 |
+
<input type="range" id="slider2" min="1" max="10" step="1" value="5">
|
| 24 |
+
</div>
|
| 25 |
+
<div>
|
| 26 |
+
<label for="option3">Option 3:</label>
|
| 27 |
+
<input type="text" id="option3">
|
| 28 |
+
<input type="range" id="slider3" min="1" max="10" step="1" value="5">
|
| 29 |
+
</div>
|
| 30 |
+
</form>
|
| 31 |
+
<button onclick="calculate()">Calculate</button>
|
| 32 |
+
<p id="result"></p>
|
| 33 |
+
<script>
|
| 34 |
+
function calculate() {
|
| 35 |
+
var option1 = document.getElementById("option1").value;
|
| 36 |
+
var option2 = document.getElementById("option2").value;
|
| 37 |
+
var option3 = document.getElementById("option3").value;
|
| 38 |
+
var weight1 = parseInt(document.getElementById("slider1").value);
|
| 39 |
+
var weight2 = parseInt(document.getElementById("slider2").value);
|
| 40 |
+
var weight3 = parseInt(document.getElementById("slider3").value);
|
| 41 |
+
var total = weight1 + weight2 + weight3;
|
| 42 |
+
var option1Score = weight1 / total;
|
| 43 |
+
var option2Score = weight2 / total;
|
| 44 |
+
var option3Score = weight3 / total;
|
| 45 |
+
var result = "";
|
| 46 |
+
if (option1Score > option2Score && option1Score > option3Score) {
|
| 47 |
+
result = option1;
|
| 48 |
+
} else if (option2Score > option1Score && option2Score > option3Score) {
|
| 49 |
+
result = option2;
|
| 50 |
+
} else if (option3Score > option1Score && option3Score > option2Score) {
|
| 51 |
+
result = option3;
|
| 52 |
+
} else {
|
| 53 |
+
result = "No clear winner!";
|
| 54 |
+
}
|
| 55 |
+
document.getElementById("result").innerHTML = "The best option is " + result + ".";
|
| 56 |
+
}
|
| 57 |
+
</script>
|
| 58 |
+
|
| 59 |
+
<!DOCTYPE html>
|
| 60 |
+
<html>
|
| 61 |
+
<head>
|
| 62 |
+
<title>Rainbow Theme</title>
|
| 63 |
+
<style>
|
| 64 |
+
body {
|
| 65 |
+
background: linear-gradient(to bottom, #FF0000, #FF7F00, #FFFF00, #00FF00, #0000FF, #2E2B5F, #8B00FF);
|
| 66 |
+
}
|
| 67 |
+
h1 {
|
| 68 |
+
color: #FFFFFF;
|
| 69 |
+
text-align: center;
|
| 70 |
+
text-shadow: 2px 2px #000000;
|
| 71 |
+
font-size: 48px;
|
| 72 |
+
font-family: Arial, sans-serif;
|
| 73 |
+
margin-top: 100px;
|
| 74 |
+
}
|
| 75 |
+
p {
|
| 76 |
+
color: #FFFFFF;
|
| 77 |
+
text-align: center;
|
| 78 |
+
font-size: 24px;
|
| 79 |
+
font-family: Arial, sans-serif;
|
| 80 |
+
margin-top: 50px;
|
| 81 |
+
}
|
| 82 |
+
</style>
|
| 83 |
+
</head>
|
| 84 |
+
<body>
|
| 85 |
+
<h1>Welcome to my Rainbow Theme!</h1>
|
| 86 |
+
<p>This is an example of how to create a rainbow-colored theme in HTML using a linear gradient background.</p>
|
| 87 |
+
</body>
|
| 88 |
+
</html>
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
</body>
|
| 92 |
</html>
|