-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
80 lines (76 loc) · 1.97 KB
/
index.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
72
73
74
75
76
77
78
79
80
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>replit</title>
<style>
body {
font-family: "Segoe UI", "Microsoft YaHei UI", sans-serif;
}
</style>
<script src="lang.js"></script>
</head>
<body>
<div>
<script>
// There should be a better method, shouldn't it?
document.write(window.sl["enter-start-time"])
</script>
</div>
<div>
<input id="start-hour" type="number">
<script>document.write(window.sl["hour"])</script>
<br>
<input id="start-min" type="number">
<script>document.write(window.sl["minute"])</script>
<br>
<!--<input id="sec" type="number">秒-->
</div>
<div>
<script>document.write(window.sl["enter-end-time"])</script>
</div>
<div>
<input id="end-hour" type="number">
<script>document.write(window.sl["hour"])</script>
<br>
<input id="end-min" type="number">
<script>document.write(window.sl["minute"])</script>
<br>
<!--<input id="sec" type="number">秒-->
</div>
<button id="submit">
<script>document.write(window.sl["submit"])</script>
</button>
<br>
<div>
<script>document.write(window.sl["new-site"]);</script>
<a href="https://onlyahuman7926.github.io/tm">
https://onlyahuman7926.github.io/tm
</a>
<span> (Test Manager)</span>
</div>
<script>
submit.onclick = () => {
let now = new Date();
let start = +new Date(
now.getFullYear(),
now.getMonth(),
now.getDate(),
+document.getElementById("start-hour").value,
+document.getElementById("start-min").value,
0
)
let finish = +new Date(
now.getFullYear(),
now.getMonth(),
now.getDate(),
+document.getElementById("end-hour").value,
+document.getElementById("end-min").value,
0
);
window.location.href = `./clock.html?startTime=${start}&finishTime=${finish}`;
}
</script>
</body>
</html>