宅博士Lv16
为自己网站增加已经运行时间x年x月x日x秒 技术教程
body或head插入 [text]<SPAN id=ikmoe></SPAN> <SCRIPT language=javascript> function show_date_time(){ window.setTimeout("show_date_time()", 1000); BirthDay=new Date("9/9/9999 1::00:00");//建站日期 today=new Date(); timeold=(today.getTime()-BirthDay.getTime()); sectimeold=timeold/1000 secondsold=Math.floor(sectimeold); msPerDay=24*60*60*1000 e_daysold=timeold/msPerDay daysold=Math.floor(e_daysold); e_hrsold=(e_daysold-daysold)*24; hrsold=Math.floor(e_hrsold); e_minsold=(e_hrsold-hrsold)*60; minsold=Math.floor((e_hrsold-hrsold)*60); seconds=Math.floor((e_minsold-minsold)*60); ikmoe.innerHTML="本站在黑暗势力下存货"+daysold+"天"+hrsold+"小时"+minsold+"分"+seconds+"秒"; } show_date_time(); </SCRIPT>[/text]
4 已被阅读了3193次 楼主 2018-10-05 01:19:57