<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
function showTime(){
var tDate = new Date();
var tseconds = tDate.getSeconds();
if (tseconds < 10)
tseconds = '0' + tseconds;
var timeStr = '当前时间是' + tDate.getHours() + ':' + tDate.getMinutes() + ':' + tseconds;
document.getElementById('time').innerHTML = timeStr;
setTimeout(showTime, 1000);
}
</script>
</head>
<body onload="showTime()">
<div id="content">
<div id="time">刷新</div>
</div>
</body>
</html>