简单生活

Simple life , it's as easy as 1,2,3...

倒计时++ 1.4 for Z-Blog

原来发过一个倒计时的插件,这个算是升级版本,简单介绍一下:

1、使用xml做为数据库,实现了添加多个倒计时
2、自动生成和删除include目录下的调用文件
3、使用JQ插件的日期选择,支持全浏览器

阅读全文...

一个倒计时js脚本

JavaScript代码
  1. <script type="text/javascript">   
  2. var timedate= new Date("August 8,2008");   
  3. var times= "2008北京奥运会";   
  4. var now = new Date();   
  5. var date = timedate.getTime() - now.getTime();    
  6. var time = Math.floor(date / (1000 * 60 * 60 * 24)+1);    
  7. if (time >= 0) document.write( "距离"+times+"还有"+time +"天")   
  8. else if (time <=3)   
  9. document.write( "<font color=red>距离"+times+"还有"+time +"天</font>")   
  10. </script>  

写了一个Z-Blog的倒计时插件,用的就是这个js,http://bbs.rainbowsoft.org/thread-23137-1-1.html

普遍见到的有个错误,已经修正了,(1000 * 60 * 60 * 24)+1

阅读全文...

分页:«1»
Powered By Z-Blog 1.8 Walle Build 91204
Copyright © 2007-2011 Wilf.cn. Some Rights Reserved