文章来源: BBS.KESONIC.COM
<script language="JavaScript" > var symbol="2008年奥运会"; var deadline= new Date("8/8/2008"); var now = new Date(); var leave = deadline.getTime() - now.getTime(); var day = Math.floor(leave / (1000 * 60 * 60 * 24)); document.write("<font color=’#990000’ size=2.0>") if (day > 0) document.write("今天离"+ symbol+"还有"+day +"天!") else if (day == 0) document.write("明天就是"+symbol+"啦!") else if (day == -1) document.write("今天就是"+symbol+"呀!") else document.write("唉呀!"+symbol+"已经过了!"); </script>
|