首页 | 代码中心 | 源码下载 | 用户管理 | 用户留言 | 导航 | 繁體
代码秀,专业程序代码提供商(源码下载,编程技术)
<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 --> <-- Begin var 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("") 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(""); } // End --> </Script> 特别说明:如网页特效代码中有引用图片文件等,请自己下载到本地调试!