<html>
<head>
<meta charset=”utf-8″>
<title>计时器</title>
</head>
<body>
<div id=”div”></div>
<script type=”text/javascript”>
var div=document.getElementById(‘div’);
setInterval(function(){
var myday = new Date;
div.innerHTML=myday;
},1000);
</script>
</body>
</html>
版权声明:本文为Chenbaby_原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。