setTimeout()使用方法
<script language="javascript">function clock()
{
var date=new Date();
var hours=date.getHours();
var minutes=date.getMinutes();
var seconds=date.getSeconds();
document.write("现在是"+hours+":"+minutes+":"+seconds);
setTimeout("clock()",1000);
}
clock()
</script>