-
Notifications
You must be signed in to change notification settings - Fork 0
/
COVID game.js
65 lines (50 loc) · 2.33 KB
/
COVID game.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
function check () {
var selectedstrains = document.getElementById('strains').value;
if(selectedstrains == 'SARS-Cov-2') {
document.getElementById('result').innerHTMl = 'Correct';
document.getElementById('result').style.color = 'green' ;
} else{
document.getElementById('result').innerHTMl = 'Try again';
document.getElementById('result').style.color ='red';
}
document.getElementById('result').innerHTMl = selectedstrains
var selectedsymptoms = document.getElementById('symptoms').value;
if(selectedsymtptoms == 'All of the above') {
document.getElementById('result').innerHTMl = 'Correct';
document.getElementById('result').style.color = 'green';
} else{
document.getElementById('result').innerHTMl = 'Try again';
document.getElementById('result').style.color ='red';
}
document.getElementById('result').innerHTMl = selectedsymptoms
var selectedprecaution = document.getElementById('precaution').value;
if(selectedprecaution == 'All of the above') {
document.getElementById('result').innerHTMl = 'Correct';
document.getElementById('result').style.color = 'green';
} else{
document.getElementById('result').innerHTMl = 'Try again';
document.getElementById('result').style.color ='red';
}
document.getElementById('result').innerHTMl = selectedprecaution
var selectedspread = document.getElementById('spread').value;
if(selectedprecaution == 'A&C') {
document.getElementById('result').innerHTMl = 'Correct';
document.getElementById('result').style.color = 'green';
} else{
document.getElementById('result').innerHTMl = 'Try again';
document.getElementById('result').style.color ='red';
}
document.getElementById('result').innerHTMl = selectedspread
var selectedexperience = document.getElementById('experience').value;
if(selectedexperience == 'Contact the emergency room') {
document.getElementById('result').innerHTMl = 'Correct';
document.getElementById('result').style.color = 'green';
} else{
document.getElementById('result').innerHTMl = 'Try again';
document.getElementById("result").style.color = "red";
}
document.getElementById('result').innerHTMl = selectedexperience
}
function togglePopup(){
document.getElementById('popup-1').classList.toggle('active');
}