-
Notifications
You must be signed in to change notification settings - Fork 2
/
Quiz_game2.html
74 lines (56 loc) · 2.26 KB
/
Quiz_game2.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
<!-- Sport HTML Page-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Quiz Game</title>
<!--connecting css file with html-->
<link href="Quiz_game.css" rel="stylesheet">
<!--connecting js file with html-->
<script src="Quiz_game.js"></script>
</head>
<body>
<h1> Test your sports knowledge</h1>
<!--Building a form for the Quiz Questions-->
<form id="quiz2" name="quiz2">
<p>What is generally considered to be the world's most popular sport? </p>
<input type="radio" id="mc" name="k1" value="Baseball">Baseball<br>
<input type="radio" id="mc" name="k1" value="Soccer">Soccer<br>
<input type="radio" id="mc" name="k1" value="Basketball">Basketball<br>
<input type="radio" id="mc" name="k1" value="Fencing">Fencing<br>
<div id="after_click">
<p id="msg7"></p>
</div>
<p>Which sport did Michael Phelps excel in?</p>
<input type="radio" id="mc" name="k2" value="tennis">tennis<br>
<input type="radio" id="mc" name="k2" value="Volleyball">Volleyball<br>
<input type="radio" id="mc" name="k2" value="Swimming">Swimming<br>
<input type="radio" id="mc" name="k2" value="Fencing">Fencing<br>
<div id="after_click">
<p id="msg8"></p>
</div>
<p>Who was the soccer world cup winner 2006</p>
<input type="radio" id="mc" name="k3" value="France">France<br>
<input type="radio" id="mc" name="k3" value="Italy">Italy<br>
<input type="radio" id="mc" name="k3" value="Brasil">Brasil<br>
<div id="after_click">
<p id="msg9"></p>
</div>
</br>
<input id="button" type="button" value="Done!!" onclick="check_2();">
</form>
<!--Building a div box for messages-->
<div id="after_click">
<p id="msg"></p>
<p id="correct_answers"></p>
</div>
<!--Building a button to get u back to zero point (restart) -->
<button id="button" onclick="myFunction()">Restart</button>
<!--Building another div with same id(after_click) so i can control all messages to appear just after user click on done button -->
<div id="after_click">
<p id="m"></p>
</div>
<!--Building a button that appear after click just when the answers are right -->
<input type="submit" value=" Go to the next level " id="buttonlevel2" class="hidden" onclick="location.href='Quiz_game22.html';">
</body>
</html>