显示时钟的JavaScript程序

<body>
<div id="ShowTime" align="left"></div>

<script>
showTime();
function showTime()
{
try
{
var date;
if (date==null)
{
date = new Date();
}
var unixtime = date.getTime();
document.getElementById("ShowTime").innerHTML=date.getYear()+"-"+(date.getMonth()+1)+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+":"+date.getSeconds();
setTimeout("showTime()", 1000);
}
catch(e)
{}
}
</script>
</body>

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

Time limit is exhausted. Please reload CAPTCHA.