/
test.html
71 lines (67 loc) · 1.46 KB
/
test.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
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
66
67
68
69
70
71
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>最准测试</title>
<style>
.parent {
display: flex;
justify-content: center;
align-items: center;
}
h1 {
color: red;
margin-top: 200px;
text-align: center;
width: 100%;
height: 40px;
}
input {
margin-right: 10px;
padding: 8px 10px;
width: 300px;
}
.button {
padding: 8px 12px;
border: 1px solid rgba(0,0,0, .2);
cursor: pointer;
}
.button:hover {
background-color: blue;
color: white;
}
span {
font-size: 15px;
color: #000;
font-weight: 500;
}
#parent2 {
margin-top: 20px;
}
</style>
</head>
<body>
<div>
<h1>最准验证</h1>
<div class="parent">
<span>验证问题: </span>
<input id="name" value="" />
<div class="button" onclick="test()">验证结果</div>
</div>
<div id="parent2" class="parent">
<span>答案输入:</span>
<input id="answer" value="" />
</div>
</div>
</body>
</html>
<script>
window.input = '';
function test() {
var answer = document.getElementById("answer").value;
document.getElementById("parent2").style.display = 'none';
setTimeout(function() {
alert(answer || '必须的!!!这没有什么可怀疑的!!', '测试结果:');
}, 200)
}
</script>