-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
109 lines (87 loc) · 4.17 KB
/
script.js
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
var score=0;
function anime_question_1(){
if(document.getElementById("OPT2_Q1").checked==true){
swal("Congratulations","Correct Answer","success")
score=score+1
}
else {
swal("Wrong","Hopefully you get the next one right","error")
}
document.getElementById("anime_div_1").style.display="none"
document.getElementById("anime_div_2").style.display="block"
}
function anime_question_2(){
if(document.getElementById("OPT3_Q2").checked==true){
swal("Congratulations","Correct Answer","success")
score=score+1
}
else{
swal("Wrong","Hopefully you get the next one right","error")
}
document.getElementById("anime_div_1").style.display="none"
document.getElementById("anime_div_2").style.display="none"
document.getElementById("anime_div_3").style.display="block"
}
function anime_question_3(){
if(document.getElementById("OPT1_Q3").checked==true){
swal("Congratulations","Correct Answer","success")
score=score+1
}
else{
swal("Wrong","Hopefully you get the next one right","error")
}
document.getElementById("anime_div_1").style.display="none"
document.getElementById("anime_div_2").style.display="none"
document.getElementById("anime_div_3").style.display="none"
document.getElementById("anime_div_4").style.display="block"
}
function anime_question_4(){
if(document.getElementById("OPT1_Q4").checked==true){
swal("Congratulations","Correct Answer","success")
score=score+1
}
else{
swal("Wrong","Hopefully you get the next one right","error")
}
document.getElementById("anime_div_1").style.display="none"
document.getElementById("anime_div_2").style.display="none"
document.getElementById("anime_div_3").style.display="none"
document.getElementById("anime_div_4").style.display="none"
document.getElementById("anime_div_5").style.display="block"
}
function anime_question_5(){
if(document.getElementById("OPT2_Q5").checked==true){
swal("Congratulations","Hopefully you enjoyed this quiz","success")
score=score+1
}
else{
swal("Wrong","But hopefully you enjoyed this quiz","error")
}
document.getElementById("anime_div_1").style.display="none"
document.getElementById("anime_div_2").style.display="none"
document.getElementById("anime_div_3").style.display="none"
document.getElementById("anime_div_4").style.display="none"
document.getElementById("anime_div_5").style.display="none"
// document.getElementById("anime_div_result").style.display="block"
// if (score==5){
// document.getElementById("result").innerHTML="Your score is 5 out of 5 <br><br> You are one of the few people who really love anime";
// }
// else if (score==4)
// {
// document.getElementById("result").innerHTML="Your score is 4 out of 5 <br><br> You have great knowledge of anime"
// }
// else if (score==3)
// {
// document.getElementById("result").innerHTML="Your score is 3 out of 5 <br><br> You did pretty well"
// }
// else if (score==2)
// {
// document.getElementById("result").innerHTML="Your score is 2 out of 5 <br><br> You could have done better"
// }
// else if (score==1)
// {
// document.getElementById("result").innerHTML="Your score is 1 out of 5 <br><br> You better sharpen up those anime facts"
// }
// else if (score==0){
// document.getElementById("result").innerHTML="Your score is 0 out of 5 <br><br> You do not watch much anime"}
}