首页>>学生风采>>河南经贸职业学院孙丽超>>观点>>如何运用HTML制作倒计时

如何运用HTML制作倒计时

作者:孙丽超
日期:2012/11/8 10:15:45

<html>
<body bgcolor=black>
<script language="JavaScript">
<!-- //
var deadline=new Date("5/1/2012");
var symbol="2012年5月1日";
var now = new Date();
var leave =deadline.getTime() - now.getTime();
var day = Math.floor(leave/(1000*60 * 60 * 24))+1;
if (day>0)
   document.write("<font size=7 color=yellow> <center>今天离"+ symbol+"还有"+day +"天")
else if (day == 0)
     document.write("只有1天啦!")
else
    document.write("唉呀!已经过了!");
// -->
</script>
</body>
</html>

http://abc.wm23.com/sunlichao822

http://weibo..com/sunlichao822

欢迎来访

分享