-
Notifications
You must be signed in to change notification settings - Fork 0
/
egg.html
68 lines (64 loc) · 2.49 KB
/
egg.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
<html>
<head>
<meta charset="utf-8" >
<title>NYQ❤ZHYX</title>
<script type="text/javascript" language="javascript">
function leftTimer(year,month,day,hour,minute,second){
var leftTime = (new Date(year,month-1,day,hour,minute,second)) - (new Date()); //计算剩余的毫秒数
leftTime = Math.abs(leftTime);
var days = parseInt(leftTime / 1000 / 60 / 60 / 24 , 10); //计算剩余的天数
var hours = parseInt(leftTime / 1000 / 60 / 60 % 24 , 10); //计算剩余的小时
var minutes = parseInt(leftTime / 1000 / 60 % 60, 10);//计算剩余的分钟
var seconds = parseInt(leftTime / 1000 % 60, 10);//计算剩余的秒数
var weeks = parseInt(leftTime / 1000 / 60 /60 / 24 / 7 + 1, 10) //计算周次
days = checkTime(days);
hours = checkTime(hours);
minutes = checkTime(minutes);
seconds = checkTime(seconds);
// 这里的时间就是时间起始点,可以按照格式修改
setInterval("leftTimer(2021,10,31,12,10,0)",1000);
document.getElementById("timer").innerHTML = days+"天" + hours+"小时" + minutes+"分"+seconds+"秒(第"+weeks+"周)";
}
function checkTime(i){ //将0-9的数字前面加上0,例1变为01
if(i<10)
{
i = "0" + i;
}
return i;
}
</script>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?86637b31b3b90becff972cbeabcda26f";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body onload="leftTimer()" bgcolor="#fcb7b0">
<br>
<font color='white'><h1 align="center">陪伴是最长情的告白</h1>
<br>
<h3 align="center">“谢谢小张同学在茫茫人海中选择鄙人作为队友</h3>
<h3 align="center">我钦佩这份勇气,欣赏这份眼光,不负这份信任</h3>
<h3 align="center">此情可待❤未来可期</h3>
<h3 align="center">执子之手 与子偕老”</h3>
<h3 align="center"> —— NYQ</h3>
<br>
<h3 align="center">“刚好你有很多故事</h3>
<h3 align="center">刚好我是一个喜欢听故事的人</h3>
<h3 align="center">余生还长</h3>
<h3 align="center">不偏不倚❤刚好是你”</h3>
<h3 align="center"> —— ZhYX</h3>
<br>
<p align="center">我们已经相恋了:</p>
<p align="center"><div align="center" id="timer" ></div></p>
</font>
<br>
<br>
<font color="#f88d82"><p align="center">built by NYQ with love on Nov 25, 2021</p>
<p align="center">©2021 All Rights Reserved</p></font>
</body>
<ml>