javascript 的简单动态时钟的实现
<script type="text/javascript">
function clock(){
var time=new Date();
var hours=time.getHours();
var minutes=time.getMinutes();
var seconds=time.getSeconds();
//document.write("现在是"+hours+"时"+minutes+"分"+seconds+"秒");
document.getElementById("times").value="现在是"+hours+"时"+minutes+"分"+seconds+"秒";
setTimeout("clock()",1000);
}
</script>