<html>
<head>
<title>时间显示</title>
</head>
<body onload="time()">
<div id=meizz>
<script language=javascript><!--
function time()
{
   var now = new Date();
   var h = (now.getHours()   > 9) ? now.getHours()   : "0" + now.getHours();
   var m = (now.getMinutes() > 9) ? now.getMinutes() : "0" + now.getMinutes();
   var s = (now.getSeconds() > 9) ? now.getSeconds() : "0" + now.getSeconds();
   var noon= (now.getHours()   > 12)? "PM" :"AM";
   var  myclock="<center><font color=red>现在是:"+h+":"+m+":"+s+":"+" "+noon+"</font></center>";
    document.all.meizz.innerHTML = myclock;
    setTimeout("time()",1000) ;
  }
-->
</script>
</body>
</html>