引用 | 编辑
香吉士
2009-10-29 20:05 |
楼主
▼ |
||
x1
【插件资讯】插件名称:在所有页面上 放上2012世界末日倒数计时器 适用版本:7.0 语言编码:通用 插件作者:香吉士 版权所属:香吉士 原帖连结:原创 支持网站:http://allen.ncc.to/index.php 【插件说明】 改编自 2009年倒数小插件 后台>>广告>>自定义广告>>添加+ 页头通栏广告 广告标题 2012 广告投放范围 全部 广告起始时间 自订 广告结束时间 2012-12-22 展现方式 HTML 代码 广告 HTML 代码: 复制程式 <body onload="clock();return true"> <table border="0" cellpadding="0" cellspacing="0" style="border-width:0; border-collapse: collapse" bordercolor="#111111" width="250" id="AutoNumber1" height="50"> <tr> <td width="195" height="88" background="2.gif" bordercolor="#FF6600" bordercolorlight="#FF6600" bordercolordark="#FF6600" style="border-style: none; border-width: medium"><script language="JavaScript"> var DifferenceHour = -1 var DifferenceMinute = -1 var DifferenceSecond = -1 var Tday = new Date("December 20, 2012 23:59:59") //修改倒数计算日期 var daysms = 24 * 60 * 60 * 1000 var hoursms = 60 * 60 * 1000 var Secondms = 60 * 1000 var microsecond = 1000 function clock() { var time = new Date() var hour = time.getHours() var minute = time.getMinutes() var second = time.getSeconds() var timevalue = ""+((hour > 12) ? hour-12:hour) timevalue +=((minute < 10) ? ":0":":")+minute timevalue +=((second < 10) ? ":0":":")+second timevalue +=((hour >12 ) ? " PM":" AM") var convertHour = DifferenceHour var convertMinute = DifferenceMinute var convertSecond = DifferenceSecond var Diffms = Tday.getTime() - time.getTime() DifferenceHour = Math.floor(Diffms / daysms) Diffms -= DifferenceHour * daysms DifferenceMinute = Math.floor(Diffms / hoursms) Diffms -= DifferenceMinute * hoursms DifferenceSecond = Math.floor(Diffms / Secondms) Diffms -= DifferenceSecond * Secondms var dSecs = Math.floor(Diffms / microsecond) if(convertHour != DifferenceHour) document.formnow.dd.value=DifferenceHour if(convertMinute != DifferenceMinute) document.formnow.hh.value=DifferenceMinute if(convertSecond != DifferenceSecond) document.formnow.mm.value=DifferenceSecond document.formnow.ss.value=dSecs setTimeout("clock()",1000) } </script> <form name="formnow" style="font-size: 2pt; font-family: Tahoma"> <p><font face="Tahoma" color="#000000"><font size="2"> </font><font size="1"> <FONT size=2><FONT color=#ff0000><STRONG>2012年10月21日</STRONG></FONT>末日倒数</FONT><input type="text" size="2" name="dd" style="font-family: Tahoma; font-size: 10 pt"></font><font size="2"> 天 </font> <input type="text" size="1" name="hh" style="font-family: Tahoma"><font size="2">:</font><input type="text" size="1" name="mm" style="font-family: Tahoma"><font size="2">:</font><input type="text" size="1" name="ss" style="font-family: Tahoma"></font></p> </form> </td> <td width="8%" height="88" bordercolor="#FF6600" bordercolorlight="#FF6600" bordercolordark="#FF6600" style="border-style: none; border-width: medium"> <img border="0" src="l.gif" width="6" height="88"></td> </tr> </table> </body> x0
|
引用 | 编辑
twnhostCom
2010-01-11 02:15 |
1楼
▲ ▼ |
WOW...很好的倒数程式
推! x0 |