-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquestion9.html
35 lines (34 loc) · 1.26 KB
/
question9.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
<!DOCTYPE html>
<html lang="en">
<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">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div>
<h1 id="test">Vraag 9
<br>
Schrijf de betekenis van vetgedrukt woord op.
</h1>
<p>Vul aan:
I emptied the <b>contents</b> of my purse
</p>
<label for="answer">antwoord: </label>
<input type="text" id="answer">
<input type="submit" id="button">
<script>
document.getElementById("button").addEventListener("click", checkAnswer); // Checks for answer to be submitted
function checkAnswer(){ // Code that runs once answer is submitted
var answer = document.getElementById("answer").value; // Gets answer
if(answer == 'what is inside'){ // Checks if answer is correct
window.location.href = 'question10.html'; // Directs to next question
}else{ // Wrong answer
alert("Verkeerd antwoord :/");
}
};
</script>
</div>
</body>
</html>