-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
70 lines (70 loc) · 2.41 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="./assets/css/reset.css" />
<link rel="stylesheet" href="./assets/css/style.css" />
<title>JavaScript Code Quiz</title>
</head>
<body>
<header>
<!--User can click here to view previous scores-->
<div><a id="scores-link" href="./scores.html">Scores</a></div>
<!--User will be shown countdown timer here-->
<div>Timer: <span id="timer">60</span></div>
</header>
<main>
<div id="start-page">
<h1>JavaScript Code Quiz</h1>
<p id="instructions">
You have 60 seconds to answer 5 multiple choice questions,<br />but be
careful: each incorrect answer will subtract time from the clock!
</p>
<button class="btn" id="start-button">START</button>
</div>
<div id="quiz-page" class="hide">
<h1 id="question-container"></h1>
<!--Where quiz options will be displayed-->
<div class="options-container">
<button
onclick="checkAnswer(event)"
class="option-button btn"
id="opt0"
></button>
<button
onclick="checkAnswer(event)"
class="option-button btn"
id="opt1"
></button>
<button
onclick="checkAnswer(event)"
class="option-button btn"
id="opt2"
></button>
<button
onclick="checkAnswer(event)"
class="option-button btn"
id="opt3"
></button>
<!--Where result following each quiz question will be displayed-->
<p id="question-result"></p>
</div>
</div>
<div id="end-page" class="hide">
<p id="save-instructions">
Your score is <span id="final-score"></span> out of 5.<br />Enter your
initials to save your score!
</p>
<form action="">
<label for="initials">Initials:</label>
<input type="text" name="Initials" id="initials-input" />
<button class="btn" id="save-button">Save</button>
</form>
<button class="btn" id="returnToStart">Return to Start Page</button>
</div>
</main>
<script src="./assets/js/script.js"></script>
</body>
</html>