3000年倒计时

代码:

<!DOCTYPE html>

<html>

<body>

 

<p>Countdown to year 3000:</p>

 

<p>

<%millennium=cdate("1/1/3000 00:00:00")%>

 

It is

<%response.write(DateDiff("yyyy", Now(), millennium))%>

years to year 3000!

<br>

It is

<%response.write(DateDiff("m", Now(), millennium))%>

months to year 3000!

<br>

It is

<%response.write(DateDiff("ww", Now(), millennium))%>

weeks to year 3000!

<br>

It is

<%response.write(DateDiff("d", Now(), millennium))%>

days to year 3000!

<br>

It is

<%response.write(DateDiff("h", Now(), millennium))%>

hours to year 3000!

<br>

It is

<%response.write(DateDiff("n", Now(), millennium))%>

minutes to year 3000!

<br>

It is

<%response.write(DateDiff("s", Now(), millennium))%>

seconds to year 3000!

</p>

 

</body>

</html>

结果:

Countdown to year 3000:

It is 987 years to year 3000!
It is 11835 months to year 3000!
It is 51456 weeks to year 3000!
It is 360192 days to year 3000!
It is 8644588 hours to year 3000!
It is 518675231 minutes to year 3000!
It is 31120513809 seconds to year 3000!

相关文章