Repository navigation
Expand file tree
/
Copy pathscript.js
More file actions
65 lines (60 loc) · 1.78 KB
/
Copy pathscript.js
File metadata and controls
65 lines (60 loc) · 1.78 KB
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
//Question 1
const targetDiv = document.getElementById('answer1');
const btn = document.getElementById('question1');
btn.onclick = function () {
if (targetDiv.style.display !== "none") {
targetDiv.style.display = "none";
} else {
targetDiv.style.display = "block";
}
}
//Question2
const question2 = document.getElementById('answer2');
const q2btn = document.getElementById('question2');
q2btn.onclick = function () {
if (question2.style.display !== "none") {
question2.style.display = "none";
} else {
question2.style.display = "block";
}
}
//Question3
const question3 = document.getElementById('answer3');
const q3btn = document.getElementById('question3');
q3btn.onclick = function () {
if (question3.style.display !== "none") {
question3.style.display = "none";
} else {
question3.style.display = "block";
}
}
//Question4
const question4 = document.getElementById('answer4');
const q4btn = document.getElementById('question4');
q4btn.onclick = function () {
if (question4.style.display !== "none") {
question4.style.display = "none";
} else {
question4.style.display = "block";
}
}
//Question5
const question5 = document.getElementById('answer5');
const q5btn = document.getElementById('question5');
q5btn.onclick = function () {
if (question5.style.display !== "none") {
question5.style.display = "none";
} else {
question5.style.display = "block";
}
}
//Question6
const question6 = document.getElementById('answer6');
const q6btn = document.getElementById('question6');
q6btn.onclick = function () {
if (question6.style.display !== "none") {
question6.style.display = "none";
} else {
question6.style.display = "block";
}
}