标题:
[转帖]离2008北京奥运会还有
[打印本页]
作者:
cn2002
时间:
2004-3-8 08:55
标题:
[转帖]离2008北京奥运会还有
作者:farewell
<Script Language = "JavaScript">
function time1()
{
now=new Date();
m=now.getMonth();
n=now.getYear()
a=2008-now.getYear();
b=12-now.getMonth();
if(m=1,3,5,7,8,10,12){c=31-now.getDate()}
if(m=4,6,9){c=30-now.getDate()}
if(m=2){c=28-now.getDate()}
if(n=2004,2008){c=29-now.getDate()}
e="0"+24-now.getHours();
f="0"+59-now.getMinutes();
g="0"+60-now.getSeconds();
if(e>10){e=24-now.getHours()}
if(f>10){f=59-now.getMinutes()}
if(g>10){g=60-now.getSeconds()}
document.Time.CLOCK.value="离2008北京奥运会还有"+a+"年"+b+"个月"+c+"天"+e+"小时"+f+"分"+g+"秒"
setTimeout( 'time1()',1000)
}
</SCRIPT>
<form method="post" name="Time">
<input name="CLOCK" size="52" value="">
</form>
<SCRIPT>
time1()
</SCRIPT>
复制代码
欢迎光临 星星博客 (http://commerce.huhoo.net/)
Powered by Discuz! 7.0.0