-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.html
46 lines (38 loc) · 1021 Bytes
/
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<title>test</title>
</head>
<body>
<input type="number" id="input">
<input type="text" id="result">
<button id="btnRequest">请求</button>
<button id="btnClear">清空</button>
<button onclick="f()">跳转</button>
<script src="main.js"></script>
<script src="worker.js"></script>
<script>
Observer[1] = function (msg) {
result.value = JSON.stringify(msg)
}
Observer[2] = function (msg) {
result.value = JSON.stringify(msg)
}
btnRequest.onclick = function () {
if (1 != input.value && 2 != input.value) {
input.value = 1
}
Request(input.value)
}
btnClear.onclick = function () {
result.value = ''
}
function f() {
location.href = './test2.html';
}
</script>
</body>
</html>