例 显示出:距开业时间还有24小时20分
<%
response.write "距开业时间还有"
response.write "<font color=blue><u>"
response.write DateDiff("d",Date(),"2007-10-18")
response.write "</font></u>"
response.write "天"
%>
[CODE]<script language="vbscript">
setTimeout "clock", 1000
sub clock()
t1="2007-10-31 10:30:00"
num=datediff("s",now(),t1)
s=num mod 60&"秒"
m=(num\60) mod 60
if m=0 then
m=""
else
m=m&"分"
end if
h=(num\60\60) mod 24
if h=0 then
h=""
else
h=h&"时"
end if
d=num\60\60\24
if d=0 then
d=""
else
d=d&"天"
end if
NowTime=d& h & m & s
NowT.InnerHtml=NowTime
setTimeout "clock", 1000
end sub
</script>
<font color="#0000FF" ID="NowT">[/CODE]
有没有判断闰年?会不会是这里的问题