学习首页 百科 人生课堂 办公软件 英语学习 操作系统 故事会 编程资料 软件学习 设计
铭瑶网 >> 学习首页 >> 编程 >> 世纪倒计时1
标题:世纪倒计时1

【字体: 】 时间:2008-4-11 来源:互联网 作者:study

世纪倒计时1

<SCRIPT LANGUAGE="JavaScript"><!-- Original:  Alan Palmer --><!-- Web Site:  http://www.users.dircon.co.uk/~apalmer --><!-- This script and many more are available online from --><!-- The JavaScript Source!! http://javascriptsource.com --><!-- Beginvar date = new Date("January 1, 2001");var description = "the year 2001";var now = new Date();var diff = date.getTime() - now.getTime();var days = Math.floor(diff / (1000 * 60 * 60 * 24));document.write("<center><h3>")if (days > 1) {document.write(days + " days until " + description);}else if (days == 1) {document.write("Only two days until " + description);}else if (days == 0) {document.write("Tomorrow is " + description);}else {document.write("It's" + description + "!");document.write("</h3></center>");}// End --></script>

查看/参与:讨论/评论 相关文章:Javascript