forked from shehrozasghar/singlepage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
quiz_subha.html
322 lines (284 loc) · 8.96 KB
/
quiz_subha.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
<!DOCTYPE html>
<html>
<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">
<style>
ul{
list-style: none;
padding: 10px;
text-align: right;
}
a
{
padding-right: 20px;
}
header{
background-color: slategray;
font-size: larger;
padding: 20px;
text-align: center;
font-weight: 600;
}
.contact
{
text-align: center;
}
body{
padding: 10px;
}
*
{
font-family: monospace;
color: black;
}
</style>
<script>
function fn1()
{
document.getElementById("demo").innerHTML = "Correct Answer"
document.getElementById("demo").style.color ="Green"
}
function fn2()
{
document.getElementById("demo").innerHTML = "Wrong Answer"
document.getElementById("demo").style.color ="Red"
}
function fn3()
{
document.getElementById("demo1").innerHTML = "Correct Answer"
document.getElementById("demo1").style.color ="Green"
}
function fn4()
{
document.getElementById("demo1").innerHTML = "Wrong Answer"
document.getElementById("demo1").style.color ="Red"
}
function fn5()
{
document.getElementById("demo2").innerHTML = "Correct Answer"
document.getElementById("demo2").style.color ="Green"
}
function fn6()
{
document.getElementById("demo2").innerHTML = "Wrong Answer"
document.getElementById("demo2").style.color ="Red"
}
function fn7()
{
document.getElementById("demo3").innerHTML = "Correct Answer"
document.getElementById("demo3").style.color ="Green"
}
function fn8()
{
document.getElementById("demo3").innerHTML = "Wrong Answer"
document.getElementById("demo3").style.color ="Red"
}
function fn9()
{
document.getElementById("demo4").innerHTML = "Correct Answer"
document.getElementById("demo4").style.color ="Green"
}
function fn10()
{
document.getElementById("demo4").innerHTML = "Wrong Answer"
document.getElementById("demo4").style.color ="Red"
}
function gfg_Run1()
{
if(exampleCheck15.checked==true)
{
var radioButton = document.getElementById("exampleCheck15");
radioButton.checked = false;
el_down.innerHTML = "Unchecked";
}
else if(exampleCheck16.checked==true)
{
var radioButton = document.getElementById("exampleCheck16");
radioButton.checked = false;
el_down.innerHTML = "Unchecked";
}
else (exampleCheck17.checked==true)
{
var radioButton = document.getElementById("exampleCheck17");
radioButton.checked = false;
el_down.innerHTML = "Unchecked";
}
}
function gfg_Run2()
{
if(exampleCheck25.checked==true)
{
var radioButton = document.getElementById("exampleCheck25");
radioButton.checked = false;
el_down.innerHTML = "Unchecked";
}
else if(exampleCheck26.checked==true)
{
var radioButton = document.getElementById("exampleCheck26");
radioButton.checked = false;
el_down.innerHTML = "Unchecked";
}
else (exampleCheck27.checked==true)
{
var radioButton = document.getElementById("exampleCheck27");
radioButton.checked = false;
el_down.innerHTML = "Unchecked";
}
}
function gfg_Run3()
{
if(eg3.checked==true)
{
var radioButton = document.getElementById("eg3");
radioButton.checked = false;
el_down.innerHTML = "Unchecked";
}
else if(eg4.checked==true)
{
var radioButton = document.getElementById("eg4");
radioButton.checked = false;
el_down.innerHTML = "Unchecked";
}
else (eg5.checked==true)
{
var radioButton = document.getElementById("eg5");
radioButton.checked = false;
el_down.innerHTML = "Unchecked";
}
}
function gfg_Run4()
{
if(eg6.checked==true)
{
var radioButton = document.getElementById("eg6");
radioButton.checked = false;
el_down.innerHTML = "Unchecked";
}
else if(eg7.checked==true)
{
var radioButton = document.getElementById("eg7");
radioButton.checked = false;
el_down.innerHTML = "Unchecked";
}
else (eg8.checked==true)
{
var radioButton = document.getElementById("eg8");
radioButton.checked = false;
el_down.innerHTML = "Unchecked";
}
}
function gfg_Run5()
{
if(eg9.checked==true)
{
var radioButton = document.getElementById("eg9");
radioButton.checked = false;
el_down.innerHTML = "Unchecked";
}
else if(eg10.checked==true)
{
var radioButton = document.getElementById("eg10");
radioButton.checked = false;
el_down.innerHTML = "Unchecked";
}
else (eg11.checked==true)
{
var radioButton = document.getElementById("eg11");
radioButton.checked = false;
el_down.innerHTML = "Unchecked";
}
}
</script>
<title>Quiz Show</title>
</head>
<body>
<header>Quiz Show</header>
<!--Question1-->
<p>1. Who invented the Light Bulb?</p>
<div class="form-group form-check">
<input type="radio" name="exampleCheck1" id="exampleCheck15" onclick="fn2()" value="Wrong Answer">
<label for="exampleCheck1">Nelson Mandella</label><br>
<input type="radio" name="exampleCheck1" id="exampleCheck16" onclick="fn2()" value="Wrong Answer">
<label for="exampleCheck2">Abraham Lincoln</label><br>
<input type="radio" name="exampleCheck1" id="exampleCheck17" onclick="fn1()" value="Right Answer">
<label for="exampleCheck3">Thomas Alva Edison</label><br><br>
</div>
<div id="demo"></div>
<br>
<input type="Submit" class="btn btn-primary" value="Submit" name="Submit" onclick="my_function()">
<input type="reset" class="btn btn-danger" value="Clear All" onclick="gfg_Run1()">
<hr>
<!--Question2-->
<p>2. Which is the hottest planet in our Solar System?</p>
<div class="form-group form-check">
<input type="radio" name="exampleCheck2" id="exampleCheck25" onclick="fn4()">
<label for="exampleCheck1">Gotthard Base Tunnel</label><br>
<input type="radio" name="exampleCheck2" id="exampleCheck26" onclick="fn3()">
<label for="exampleCheck2">Venus</label><br>
<input type="radio" name="exampleCheck2" id="exampleCheck27" onclick="fn4()">
<label for="exampleCheck3">Yulhyeon Tunnel </label><br><br>
</div>
<div id="demo1"></div>
<br>
<input type="Submit" class="btn btn-primary" value="Submit" name="Submit" onclick="fn1()">
<input type="reset" class="btn btn-danger" value="Clear All" onclick="gfg_Run2()">
<hr>
<!--Question3-->
<p>3. Who invented the Telephone?</p>
<div class="form-group form-check">
<input type="radio" name="exampleCheck3" id="eg3" onclick="fn5()">
<label for="exampleCheck1">Alexander Graham Bell</label><br>
<input type="radio" name="exampleCheck3" id="eg4" onclick="fn6()" >
<label for="exampleCheck2">Abraham Lincoln</label><br>
<input type="radio" name="exampleCheck3" id="eg5" onclick="fn6()">
<label for="exampleCheck3">Albert Einstein</label><br><br>
</div>
<div id="demo2"></div>
<br>
<input type="Submit" class="btn btn-primary" value="Submit" name="Submit" onclick="fn3()">
<input type="Submit" class="btn btn-danger" value="Clear All" onclick="gfg_Run3() ">
<hr>
<!--Question4-->
<p>4. What is the name of the biggest planet in our solar system?</p>
<div class="form-group form-check">
<input type="radio" name="exampleCheck4" id="eg6" onclick="fn8()">
<label for="exampleCheck1">Nelson Mandella</label><br>
<input type="radio" name="exampleCheck4" id="eg7" onclick="fn7()">
<label for="exampleCheck2">Jupiter</label><br>
<input type="radio" name="exampleCheck4" id="eg8" onclick="fn8()">
<label for="exampleCheck3">Albert Einstein</label><br><br>
</div>
<div id="demo3"></div>
<br>
<input type="Submit" class="btn btn-primary" value="Submit" name="Submit" onclick="fn4()">
<input type="Submit" class="btn btn-danger" value="Clear All" onclick="gfg_Run4()">
<hr>
<!--Question5-->
<p>5. Which planet in our solar system is known as the Red Planet?</p>
<div class="form-group form-check">
<input type="radio" name="exampleCheck5" id="eg9" onclick="fn10()">
<label for="exampleCheck1">Nelson Mandella</label><br>
<input type="radio" name="exampleCheck5" id="eg10" onclick="fn10()">
<label for="exampleCheck2">Abraham Lincoln</label><br>
<input type="radio" name="exampleCheck5" id="eg11" onclick="fn9()">
<label for="exampleCheck3">Mars</label><br><br>
</div>
<div id="demo4"></div>
<br>
<input type="Submit" class="btn btn-primary" value="Submit" name="Submit" onclick="fn5()">
<input type="Submit" class="btn btn-danger" value="Clear All" onclick="gfg_Run5()">
</div>
<hr>
<div class="contact">
<a href="mailto:[email protected]"><img src="">MailMe</a>
<a><img src="./linkedin.png" height="20px"></a>
<a><img src="./facebook.png" height="20px"></a>
<a><img src="./instagram.png" height="20px"></a>
<a><img src="./twitter.png" height="20px"></a>
</div>
<br>
<header>Subha Rajagopal</header>
</body>
</html>