<html>
<head>
<META http-equiv=Content-Type content="charset=utf-8">
<script>
function 显示当前时间()
{
var 时间=new Date();
document.getElementById("显示时间").innerHTML=时间.getHours()+":"+时间.getMinutes()+":"+时间.getSeconds();
setTimeout("显示当前时间()",1000);
}
</script>
</head>
<body>
<input type="button" value="显示当前时间" onclick="显示当前时间()" />
<div id="显示时间"></div>
</body>
</html>