<SCRIPT language=JavaScript>function syeClock() { if (!document.layers && !document.all) return; timePortion = new Array; maxLength = new Array; var runTime = new Date(); timePortion[0] = runTime.getHours(); timePortion[1] = runTime.getMinutes(); timePortion[2] = runTime.getSeconds(); maxLength[0] = 5; maxLength[1] = 6; maxLength[2] = 6; var decValue = 0; var decMod = 0; var temp = ""; var hoursBackground = "#7B7BB5"; var minutesBackground = "#4D5487"; var sec; var col; var textColor = "#FFFFFF"; for (var curPor = 0; curPor <= 2; curPor++) { decValue = timePortion[curPor]; timePortion[curPor] = ""; while (decValue != 0) { decMod = decValue % 2; decValue = Math.floor(decValue / 2); timePortion[curPor] = decMod + timePortion[curPor]; } if (timePortion[curPor].length < maxLength[curPor]) { for (var i = 1; i <= maxLength[curPor] - timePortion[curPor].length; i++) { temp += "0"; } } timePortion[curPor] = temp + timePortion[curPor]; temp = ""; } movingtime = '<table border="0" cellpadding="0" cellspacing="0"><tr><td bgcolor='+ hoursBackground +'><font color='+ textColor +'>' + timePortion[0] + '</font></td><td bgcolor='+ colonBackground +'>:</td><td bgcolor='+ minutesBackground +'><font color='+ textColor +'>' + timePortion[1] + '</font></td><td bgcolor='+ colonBackground +'>:</td><td bgcolor='+ secondsBackground +'><font color='+ textColor +'>' + timePortion[2] + '</font></td></tr></table>'; if (document.layers) { document.layers.clock.document.write(movingtime); document.layers.clock.document.close(); } else if (document.all) { clock.innerHTML = movingtime; } setTimeout("syeClock()", 1000) } window.onload = syeClock; </SCRIPT><span id="clock" style="position:relative;"></span>
使用道具 舉報
本版積分規則 發表回復 回帖後跳轉到最後一頁
本論壇為非營利之網路平台,所有文章內容均為網友自行發表,不代表論壇立場!若涉及侵權、違法等情事,請告知版主處理。
廣告刊登 | 交換連結 | 贊助我們 | 服務條款 | 免責聲明 | 客服中心 | 中央分站
手機版|中央論壇
GMT+8, 2024-4-29 06:02 , Processed in 0.020853 second(s), 16 queries .
Powered by Discuz!
© 2005-2015 Copyrights. Set by YIDAS