-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSPACE-3.html
100 lines (82 loc) · 3.32 KB
/
SPACE-3.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Quiz</title>
<link rel="stylesheet" href="quiz1.css";>
</head>
<body>
<script src="quiz.js"></script>
<div id="secondsdisplay"></div>
<script>
var seconds=15;
function displayseconds ()
{
seconds -=1;
document.getElementById("secondsdisplay").innerText="Time left:"+seconds+" Seconds";
} setInterval (displayseconds, 1000);
function redirectpage()
{
window.location="final.html";
}
setTimeout( 'redirectpage()',14500);
</script>
<div class="topnav-right">
<b><a href="login.html">Home</a></b>
<b><a href="contact.html">Contact</a></b>
<b><a href="about.html">About</a></b>
</div>
<div class="header">
<div class="logo">
<img src="https://cdn.iconscout.com/icon/premium/png-512-thumb/brain-1709789-1452528.png?f=webp&w=256" width="70" height="70">
</div>
<div class="name">
<h1>QuizStorm</h1>
</div>
</div>
<div class="container">
<div class="question-container" >
<div class="question"><h2>Question 3. Which astronomer suggested that the Sun was at the center of the solar system? </h2></div>
<div class="answer-buttons">
<button id="button1" onclick="buttoncolor1()" >a. Ptolemy</button>
<button id="button2" onclick="buttoncolor2()" >b. Theon of Alexandria</button>
<button id="button3" onclick="buttoncolor3()" >c. Copernicus</button>
<button id="button4" onclick="buttoncolor4()" >d. Hypatia</button>
</div>
<button id="next-btn" onclick="window.location.href='final.html';">End Quiz</button>
</div>
</div>
<script>
function buttoncolor1(){
document.getElementById("button1").style.backgroundColor='red';
document.getElementById("button2").disabled='true';
document.getElementById("button3").disabled='true';
document.getElementById("button4").disabled='true';
document.getElementById("next-btn").style.backgroundColor='red';
};
function buttoncolor2(){
document.getElementById("button2").style.backgroundColor='red';
document.getElementById("button1").disabled='true';
document.getElementById("button3").disabled='true';
document.getElementById("button4").disabled='true';
document.getElementById("next-btn").style.backgroundColor='red';
};
function buttoncolor3(){
document.getElementById("button3").style.backgroundColor='green';
document.getElementById("button1").disabled='true';
document.getElementById("button2").disabled='true';
document.getElementById("button4").disabled='true';
document.getElementById("next-btn").style.backgroundColor='red';
};
function buttoncolor4(){
document.getElementById("button4").style.backgroundColor='red';
document.getElementById("button1").disabled='true';
document.getElementById("button2").disabled='true';
document.getElementById("button3").disabled='true';
document.getElementById("next-btn").style.backgroundColor='red';
};
</script>
<br/>
</body>
</html>