-
Notifications
You must be signed in to change notification settings - Fork 0
/
whubpa.html
263 lines (246 loc) · 11.6 KB
/
whubpa.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>武大日报平安</title>
<script type="text/javascript">
function getDate() {
var today = new Date();
var m = today.getMonth() + 1;
var d = today.getDate();
var h = today.getHours();
var min = today.getMinutes();
var s = today.getSeconds();
var milli = today.getMilliseconds();
//ps:用于解决宽度显示问题
//pps:不知为何,字符串拼接有问题,我不得不用这种神经病一样的方案来控制宽度= =||
if (milli >= 100) {
milli = (milli - (milli % 10)) / 10;
}
if (m >= 10) {
if (d >= 10) {
if (h >= 10) {
if (min >= 10) {
if (s >= 10) {
document.getElementById("DateAndTime").innerHTML = m + "-" + d + " " + h + ":" + min + ":" + s + "." + milli;
} else {
document.getElementById("DateAndTime").innerHTML = m + "-" + d + " " + h + ":" + min + ":0" + s + "." + milli;
}
} else {
if (s >= 10) {
document.getElementById("DateAndTime").innerHTML = m + "-" + d + " " + h + ":0" + min + ":" + s + "." + milli;
} else {
document.getElementById("DateAndTime").innerHTML = m + "-" + d + " " + h + ":0" + min + ":0" + s + "." + milli;
}
}
} else {
if (min >= 10) {
if (s >= 10) {
document.getElementById("DateAndTime").innerHTML = m + "-" + d + " 0" + h + ":" + min + ":" + s + "." + milli;
} else {
document.getElementById("DateAndTime").innerHTML = m + "-" + d + " 0" + h + ":" + min + ":0" + s + "." + milli;
}
} else {
if (s >= 10) {
document.getElementById("DateAndTime").innerHTML = m + "-" + d + " 0" + h + ":0" + min + ":" + s + "." + milli;
} else {
document.getElementById("DateAndTime").innerHTML = m + "-" + d + " 0" + h + ":0" + min + ":0" + s + "." + milli;
}
}
}
} else {
if (h >= 10) {
if (min >= 10) {
if (s >= 10) {
document.getElementById("DateAndTime").innerHTML = m + "-0" + d + " " + h + ":" + min + ":" + s + "." + milli;
} else {
document.getElementById("DateAndTime").innerHTML = m + "-0" + d + " " + h + ":" + min + ":0" + s + "." + milli;
}
} else {
if (s >= 10) {
document.getElementById("DateAndTime").innerHTML = m + "-0" + d + " " + h + ":0" + min + ":" + s + "." + milli;
} else {
document.getElementById("DateAndTime").innerHTML = m + "-0" + d + " " + h + ":0" + min + ":0" + s + "." + milli;
}
}
} else {
if (min >= 10) {
if (s >= 10) {
document.getElementById("DateAndTime").innerHTML = m + "-0" + d + " 0" + h + ":" + min + ":" + s + "." + milli;
} else {
document.getElementById("DateAndTime").innerHTML = m + "-0" + d + " 0" + h + ":" + min + ":0" + s + "." + milli;
}
} else {
if (s >= 10) {
document.getElementById("DateAndTime").innerHTML = m + "-0" + d + " 0" + h + ":0" + min + ":" + s + "." + milli;
} else {
document.getElementById("DateAndTime").innerHTML = m + "-0" + d + " 0" + h + ":0" + min + ":0" + s + "." + milli;
}
}
}
}
} else {
if (d >= 10) {
if (h >= 10) {
if (min >= 10) {
if (s >= 10) {
document.getElementById("DateAndTime").innerHTML = "0" + m + "-" + d + " " + h + ":" + min + ":" + s + "." + milli;
} else {
document.getElementById("DateAndTime").innerHTML = "0" + m + "-" + d + " " + h + ":" + min + ":0" + s + "." + milli;
}
} else {
if (s >= 10) {
document.getElementById("DateAndTime").innerHTML = "0" + m + "-" + d + " " + h + ":0" + min + ":" + s + "." + milli;
} else {
document.getElementById("DateAndTime").innerHTML = "0" + m + "-" + d + " " + h + ":0" + min + ":0" + s + "." + milli;
}
}
} else {
if (min >= 10) {
if (s >= 10) {
document.getElementById("DateAndTime").innerHTML = "0" + m + "-" + d + " 0" + h + ":" + min + ":" + s + "." + milli;
} else {
document.getElementById("DateAndTime").innerHTML = "0" + m + "-" + d + " 0" + h + ":" + min + ":0" + s + "." + milli;
}
} else {
if (s >= 10) {
document.getElementById("DateAndTime").innerHTML = "0" + m + "-" + d + " 0" + h + ":0" + min + ":" + s + "." + milli;
} else {
document.getElementById("DateAndTime").innerHTML = "0" + m + "-" + d + " 0" + h + ":0" + min + ":0" + s + "." + milli;
}
}
}
} else {
if (h >= 10) {
if (min >= 10) {
if (s >= 10) {
document.getElementById("DateAndTime").innerHTML = "0" + m + "-0" + d + " " + h + ":" + min + ":" + s + "." + milli;
} else {
document.getElementById("DateAndTime").innerHTML = "0" + m + "-0" + d + " " + h + ":" + min + ":0" + s + "." + milli;
}
} else {
if (s >= 10) {
document.getElementById("DateAndTime").innerHTML = "0" + m + "-0" + d + " " + h + ":0" + min + ":" + s + "." + milli;
} else {
document.getElementById("DateAndTime").innerHTML = "0" + m + "-0" + d + " " + h + ":0" + min + ":0" + s + "." + milli;
}
}
} else {
if (min >= 10) {
if (s >= 10) {
document.getElementById("DateAndTime").innerHTML = "0" + m + "-0" + d + " 0" + h + ":" + min + ":" + s + "." + milli;
} else {
document.getElementById("DateAndTime").innerHTML = "0" + m + "-0" + d + " 0" + h + ":" + min + ":0" + s + "." + milli;
}
} else {
if (s >= 10) {
document.getElementById("DateAndTime").innerHTML = "0" + m + "-0" + d + " 0" + h + ":0" + min + ":" + s + "." + milli;
} else {
document.getElementById("DateAndTime").innerHTML = "0" + m + "-0" + d + " 0" + h + ":0" + min + ":0" + s + "." + milli;
}
}
}
}
}
setTimeout('getDate()', 10);
}
function getTime() {
var today = new Date();
var h = today.getHours();
var min = today.getMinutes();
if (h >= 10) {
if (min >= 10) {
document.getElementById("time").innerHTML = h + ":" + min;
} else {
document.getElementById("time").innerHTML = h + ":0" + min;
}
} else {
if (min >= 10) {
document.getElementById("time").innerHTML = "0" + h + ":" + min;
} else {
document.getElementById("time").innerHTML = "0" + h + ":0" + min;
}
}
setTimeout('getTime()', 1000);
}
</script>
<style>
#BGI {
width: 1080px;
height: 2340px;
background-image: url(BGI_TigerDAHE.jpg);
position: absolute;
left: 0px;
top: 0px;
}
p {
font-size: 60px;
color: white;
position: center;
margin-top: 10px;
}
#display {
width: 540px;
height: 100px;
position: absolute;
left: 300px;
top: 718px;
}
#time {
font-size: 32px;
position: absolute;
left: 65px;
top: 22px;
}
input {
outline-style: none;
border: 0px;
font-size: 40px;
color: #828282;
background-color: transparent;
}
#info1 {
position: absolute;
left: 133px;
top: 174px;
}
#info2 {
position: absolute;
left: 133px;
top: 272px;
}
#info3 {
position: absolute;
left: 133px;
top: 469px;
}
#info4 {
position: absolute;
left: 133px;
top: 370px;
}
</style>
</head>
<body onLoad="getDate();getTime()">
<div id="BGI">
<image src="http://m.qpic.cn/psc?/V10aeidk4THAIv/TmEUgtj9EK6.7V8ajmQrEDIYhsxEPPGHOVEm0FwANDhW31Bcqrw5AkOXn7IIp6GWamGgNmdtPz.DRdN0e2jLVwlGDtQZvhH2juNHGGzOhns!/b&bo=OAQkCQAAAAABFyE!&rf=viewer_4">
<div id="display">
<p id="DateAndTime"></p>
<div id="info1">
<input type="text">
</div>
<div id="info2">
<input type="text">
</div>
<div id="info3">
<input type="text">
</div>
<div id="info4">
<input type="text">
</div>
</div>
</div>
<div id="time"></div>
</body>
</html>