<html>
<head>
<title> 事件</title>
<script type="text/javascript">
function clock() {
var Udate = new Date();
var weekday=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
document.body.innerHTML = "";
document.write(
Udate.getFullYear() + '年' +
Udate.getMonth() + '月' +
Udate.getDate() + '日' +
weekday[Udate.getDay()] + ' ' +
Udate.getHours() + '时' +
Udate.getMinutes() + '分' +
Udate.getSeconds() + '秒 时间戳:' + Udate.getTime());
}
setInterval("clock()", 1000);
</script>
</head>
<body>
</body>
</html>