html的时间代码

来源:百度知道 编辑:UC知道 时间:2024/05/18 01:38:30
就是网页上那个表的代码?? 知道的 告诉下 急用

<html>
<head>
<title>时间范例</title>
<script type="text/javascript">
window.onload = function(){
clock_load(document.getElementById("clock"));
}
function clock_load(obj){
if(typeof(obj)=="string")obj=o.o(obj);if(!obj)return;
window.setInterval( function(){
obj.innerHTML = new Date().toLocaleString()+' 星期'+'日一二三四五六'.charAt(new Date().getDay());
},1000);
}
</script>
</head>
<body>

<div id="clock">正在加载时间,请稍候...</div>

</body>
</html>