zoukankan
html css js c++ java
倒计时代码
Code
1
<
SCRIPT language
=
javascript
>
2
<!--
3
//
document.write("");
4
5
function
show_date_time_2008()
{
6
window.setTimeout(
"
show_date_time_2008()
"
,
1000
);
7
BirthDay
=
new
Date(
"
2008/9/14
"
);
//
这个日期是可以修改的
8
today
=
new
Date();
9
timeold
=
(BirthDay.getTime()
-
today.getTime());
10
sectimeold
=
timeold
/
1000
11
secondsold
=
Math.floor(sectimeold);
12
msPerDay
=
24
*
60
*
60
*
1000
13
e_daysold
=
timeold
/
msPerDay
14
daysold
=
Math.floor(e_daysold);
15
e_hrsold
=
(e_daysold
-
daysold)
*
24
;
16
hrsold
=
Math.floor(e_hrsold);
17
e_minsold
=
(e_hrsold
-
hrsold)
*
60
;
18
minsold
=
Math.floor((e_hrsold
-
hrsold)
*
60
);
19
seconds
=
Math.floor((e_minsold
-
minsold)
*
60
);
20
if
(daysold
<
0
)
21
{
22
span_dt_dt_2008.innerHTML
=
"
<align=center><font color=696969>
"
+
(
-
daysold)
+
"
天前
"
+
hrsold
+
"
小时
"
+
minsold
+
"
分
"
+
seconds
+
"
秒
"
+
"
<br></font>
"
;
23
}
24
else
25
{
26
span_dt_dt_2008.innerHTML
=
"
<align=center><font color=696969>
"
+
daysold
+
"
天
"
+
hrsold
+
"
小时
"
+
minsold
+
"
分
"
+
seconds
+
"
秒
"
+
"
<br></font>
"
;
27
}
28
29
}
30
31
show_date_time_2008();
32
33
//
-->
34
<
/
SCRIPT>
35
36
<
span id
=
"
span_dt_dt_2008
"
><
/
span>
查看全文
相关阅读:
php 获取机器名
php缓存参数祥解
ajax参数祥解
php 正则匹配返回字符串
TP5验证规则使用
J
j
virtualBox 桥接网卡 未指定
Spring Cloud Alibaba基础教程:Nacos配置的加载规则详解
Spring Cloud Alibaba基础教程:使用Nacos作为配置中心
原文地址:https://www.cnblogs.com/puloon/p/1277376.html
最新文章
CodeForces 297D Color the Carpet (脑补题)
CodeForces 297D Color the Carpet (脑补题)
CodeForces 297C Splitting the Uniqueness (脑补构造题)
CodeForces 297C Splitting the Uniqueness (脑补构造题)
CodeForces 297A Parity Game (脑补题)
CodeForces 297A Parity Game (脑补题)
HDU 4352 XHXJ's LIS ★(数位DP)
HDU 4352 XHXJ's LIS ★(数位DP)
hdu4507吉哥系列故事——恨7不成妻 (数位dp)
hdu3652B-number (数位dp)
热门文章
poj3252 Round Numbers (数位dp)
hdu4920Matrix multiplication (矩阵,bitset)
poj2443Set Operation (bitset)
codeforces 632F. Magic Matrix (最小生成树)
codeforces632E. Thief in a Shop (dp)
codeforces632D. Longest Subsequence (最小公倍数)
Educational Codeforces Round 9 C. The Smallest String Concatenation(字符串排序)
hdu5407CRB and Candies (逆元+数学公式)
tp 排除缓存
php 修改文件指定内容
Copyright © 2011-2022 走看看