如何制作一個(gè)倒計(jì)時(shí)的程序?
<%
CountdownDate = #1/1/2008 00:00:00AM#
If Date >= CountdownDate Then
Response.Write "2008 北京"
Response.End
End If
theDate = Now
DaysLeft = DateDiff("d",theDate,CountdownDate) - 1
theDate = DateAdd("d",DaysLeft,theDate)
HoursLeft = DateDiff("h",theDate,CountdownDate) - 1
theDate = DateAdd("h",HoursLeft,theDate)
MinutesLeft = DateDiff("n",theDate,CountdownDate) - 1
theDate = DateAdd("n",MinutesLeft,theDate)
SecondsLeft = DateDiff("s",theDate,CountdownDate) - 1
%>
<html>
<body>
現(xiàn)在時(shí)間: <%= Now %>
<p>
距離2008年還有 <%= DaysLeft%>天<%= HoursLeft %> 小時(shí)<%= MinutesLeft %>分 <%= SecondsLeft %>秒.走得最急的,都是最美的時(shí)光.
</body></html>
[1]
相關(guān)文章
如何在ASP中恰當(dāng)?shù)剡\(yùn)用Cookies?
如何在ASP中恰當(dāng)?shù)剡\(yùn)用Cookies?...2006-11-11如何處理包含javascript語(yǔ)句時(shí)的間隔符?
如何處理包含javascript語(yǔ)句時(shí)的間隔符?...2006-11-11如何把一長(zhǎng)串?dāng)?shù)字分位顯示?
如何把一長(zhǎng)串?dāng)?shù)字分位顯示?...2006-11-11