奥运倒计时

源码如下:

<script type=”text/javascript”>
   var timedate= new Date(“August 8,2008″);
   var times= “中国北京 奥运会”;
   var now = new Date();
   var date = timedate.getTime() – now.getTime();
   var time = Math.floor(date / (1000 * 60 * 60 * 24));
   if (time >= 0)
   document.write( “现在离 “+times+” 还有: “+time +” 天.”)
</script>

发表评论

电子邮件地址不会被公开。

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>