抱歉,您的浏览器无法访问本站

本页面需要浏览器支持(启用)JavaScript


了解详情 >

考研倒计时

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
<style>  
.gn_box{border: none;
border-radius: 15px; }
.gn_box {
padding: 10px 10px;
margin: 10px;
margin-bottom: 16px;
text-align: center;
background-color: #000; //背景颜色}

.time{color: #ded6d6; //时间文字颜色
h3{}
font-size: 18px;}
</style>
<div class="gn_box">
<h3 style="text-align: center; color: #d2c0c0">
<span class="tttt">考研倒计时</span>
</h3>
<div id="CountMsg" class="HotDate">
<span id="t_d" class="time"></span>
<span id="t_h" class="time"></span>
<span id="t_m" class="time"></span>
<span id="t_s" class="time"></span>
</div>
<script type="text/javascript">
function getRTime() {
var EndTime = new Date('2021/12/22 00:00:00'); /**目标时间*/
var NowTime = new Date();
var t = EndTime.getTime() - NowTime.getTime();
var d = Math.floor(t / 1000 / 60 / 60 / 24);
var h = Math.floor(t / 1000 / 60 / 60 % 24);
var m = Math.floor(t / 1000 / 60 % 60);
var s = Math.floor(t / 1000 % 60);
var day = document.getElementById("t_d");
if (day != null) {
day.innerHTML = d + " 天";
}
var hour = document.getElementById("t_h");
if (hour != null) {
hour.innerHTML = h + " 时";
}
var min = document.getElementById("t_m");
if (min != null) {
min.innerHTML = m + " 分";
}
var sec = document.getElementById("t_s");
if (sec != null) {
sec.innerHTML = s + " 秒";
}
}
setInterval(getRTime, 1000);
</script>
</div>

用户交流区

温馨提示: 遵纪守法, 友善评论!





津ICP备19009605号

WordCount17k