/
2.htm
51 lines (51 loc) · 1005 Bytes
/
2.htm
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
<html>
<head>
<meta chardet="UTF-8">
<style>
input{border:0;
background-color:#003C9D;
color:#fff;
border-radius:10px;
cursor:pointer;
}
input:hover{
color:#003C9D
background-color:#fff;
border:2px #003C9D solid;
}
</style>
<script>
var data = window.localStorage.getItem("data");
document.getElementById('random');
document.addEventListener('keydown', function(e) {
if(e.keyCode == 13){
var a = document.getElementById('answer');
var b = data.toString(2);
if(a == b){
alert("you are right");
window.location.href='2_2.htm';
}
else{
alert("You are Wrong");
window.location.href='2_2.htm';
}
}
});
</script>
</head>
<body bgcolor="orange">
<div>
<table width=100% height=100%>
<tr>
<td>
<center>
<font size="7"><p id="random">sd</p></font>
<p>轉為2進位為</p>
<input type="text" id="answer" style="font-size:18pt;height:80px;width:350px;">
</center>
</td>
</tr>
</table>
</div>
</body>
</html>