-
Notifications
You must be signed in to change notification settings - Fork 0
/
firstLevel.html
71 lines (53 loc) · 1.85 KB
/
firstLevel.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<html>
<link rel="stylesheet" type="text/css" href="index.css">
<body background="FadedTreasureMap.jpg">
<h1 style="top:10%; margin-top:0px"> Step one to finding the gold is to solve this question! </h1>
<form id = "firstQustion" name = "firstQuestion" method="get" action="secondQuestion.html" autocomplete="off" >
<div class="boxedNumeratorOneLike">
2
</div>
<hr class="barOneLike" noshade size=7 width=120px>
<div class="boxedDenominatorOneLike">
4
</div>
<img id="plusLike" src="plus.svg" height="40" width="40" style= "position:absolute; top:385px; left:600px">
<div class="boxedNumeratorTwoLike">
1
</div>
<hr class="barTwoLike" noshade size=7 width=120px>
<div class="boxedDenominatorTwoLike">
4
</div>
<img src="equalsign.svg" height="40" width="40" style="position:absolute; top:385px; left:850px">
<input type="textarea" id="answerNumOneLike"></input>
<hr class="barThreeLike" noshade size=7 width=120px>
<input type="textarea" id="answerNumTwoLike"></input>
<script type="text/javascript">
var answerNumOne = document.getElementById("answerNumOneLike")
var answerNumTwo = document.getElementById("answerNumTwoLike")
answerNumOne.addEventListener("input", function(e) {
var answer = answerNumOne.value;
if (answer != 3){
answerNumOne.setAttribute("style", "background-color:red");
console.log("you suck");
}
else{
answerNumOne.setAttribute("style", "background-color:green");
console.log("you rock!");
}
}, false);
answerNumTwo.addEventListener("input", function(e) {
var answer = answerNumTwo.value;
if (answer != 4){
answerNumTwo.setAttribute("style", "background-color:red");
console.log("you suck");
}
else{
answerNumTwo.setAttribute("style", "background-color:green");
console.log("you rock!");
}
}, false);
</script>
<button id="submitQuestion" type="submit" value="submit">Go</button>
</body>
</html>