|
哎 写了差不多半个通宵,倾力奉献一段源码"
<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>
|
|