利用javascript在当前页面显示时间
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Constellation</title>
<script type="text/javascript">
function timer()
{
var time=new Date();
document.getElementById("currentTime").innerHTML="当前时间:"+time;
}
setInterval("timer()", 1000);
</script>
</head>
<body>
<div id="currentTime">当前时间:时间载入中......</div>
<div>
</body>
</html>