首页
极刻
圈子
教程
开源
登录 / 注册
返回教程:VBScript 教程
TRY RUN / 在线示例
VBScript 教程 倒记秒数到3000年
VBScript 教程 倒记秒数到3000年
源代码
运行
<!DOCTYPE html> <html> <body> <p>Countdown to year 3000:</p> <p> <script type="text/vbscript"> millennium=CDate("1/1/3000 00:00:00") document.write("It is " & DateDiff("yyyy", Now(), millennium) & " years to year 3000!<br>") document.write("It is " & DateDiff("m", Now(), millennium) & " months to year 3000!<br>") document.write("It is " & DateDiff("d", Now(), millennium) & " days to year 3000!<br>") document.write("It is " & DateDiff("h", Now(), millennium) & " hours to year 3000!<br>") document.write("It is " & DateDiff("n", Now(), millennium) & " minutes to year 3000!<br>") document.write("It is " & DateDiff("s", Now(), millennium) & " seconds to year 3000!<br>") </script> </p> </body> </html>
运行结果