作者在 2011-03-23 14:09:02 发布以下内容
<html>
<body>
<span id="liveclock"></span>
<SCRIPT language=javascript>
function showtime(){
var Digital=new Date();
var years=Digital.getYear();
var months=Digital.getMonth()+1;
var days=Digital.getDate();
var hours=Digital.getHours();
var minutes=Digital.getMinutes();
var seconds=Digital.getSeconds();
if(months<=9)
months="0"+months;
if(minutes<=9)
minutes="0"+minutes;
if(seconds<=9)
seconds="0"+seconds;
myclock=years+"年"+months+"月"+days+"日 "+hours+":"+minutes+":"+seconds;
if(document.layers){document.layers.liveclock.document.write(myclock)
document.layers.liveclock.document.close();
}else if(document.all)
liveclock.innerHTML=myclock;
setTimeout("showtime()",1000);
}
showtime();
</SCRIPT>
</body>
</html>
<body>
<span id="liveclock"></span>
<SCRIPT language=javascript>
function showtime(){
var Digital=new Date();
var years=Digital.getYear();
var months=Digital.getMonth()+1;
var days=Digital.getDate();
var hours=Digital.getHours();
var minutes=Digital.getMinutes();
var seconds=Digital.getSeconds();
if(months<=9)
months="0"+months;
if(minutes<=9)
minutes="0"+minutes;
if(seconds<=9)
seconds="0"+seconds;
myclock=years+"年"+months+"月"+days+"日 "+hours+":"+minutes+":"+seconds;
if(document.layers){document.layers.liveclock.document.write(myclock)
document.layers.liveclock.document.close();
}else if(document.all)
liveclock.innerHTML=myclock;
setTimeout("showtime()",1000);
}
showtime();
</SCRIPT>
</body>
</html>