-
Notifications
You must be signed in to change notification settings - Fork 0
/
sherlock.html
33 lines (33 loc) · 1.17 KB
/
sherlock.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
<html>
<head>
<title>Life of the party</title>
<link rel="shortcut icon" href="#">
<link rel="stylesheet" href="open.css">
</head>
<body>
<div>Which fictional character is beleived to be real by over a quarter of Americans?</div>
<br>
Enter answer in lowercase
<br>
<input type="text" id="inputBox" value=""/>
<button onclick = "checkValue()" type="button">Enter</button>
<br><br>
<div id ="incorrect" class="answer">Wrong Answer</div>
<div id ="correct" class="answer">Correct answer</div>
<script>
var w = document.getElementById("incorrect");
var c = document.getElementById("correct");
function checkValue(){
var input = document.getElementById("inputBox").value;
if (input == "sherlock holmes"){
w.style.visibility='hidden';
c.style.visibility='visible';
window.open("home.html", "_self");
}
else{
w.style.visibility='visible';
}
}
</script>
</body>
</html>