引用 | 編輯
香吉士
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 |