奥运倒计时的JavaScript源码

| |
时间: 不指定 2008/03/01 01:27 , 作者: 邢磊
奥运倒计时的源代码


<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>
  • 中查看更多“奥运倒计时的JavaScript源码”相关内容
  • 中查看更多“奥运倒计时的JavaScript源码”相关内容
  • 中查看更多“奥运倒计时的JavaScript源码”相关内容
  • 类别:ASP:PHP:C#.NET | Tags: , , | 0 条评论, 410 次阅读
    网友评论(0):
    发表评论
    表情
    emotemotemotemot
    emotemotemotemot
    emotemotemotemot
    emotemotemotemot
    emotemotemotemot
    emotemotemotemot
    emotemotemotemot
    emotemotemotemot
    打开HTML
    打开UBB
    打开表情
    隐藏
    昵称   密码   游客无需密码
    网址   电邮   [注册]
                   

    验证码 不区分大小写