1 <html> 2 <head> 3 <title>动态显示当前系统时间</title> 4 </head> 5 <body> 6 <div id=Clock align=center></div> 7 <script> 8 function tick(){ 9 var today=new Date(); 10 timeString=today.toLocaleString(); 11 Clock.innerHTML=timeString; 12 window.setTimeout("tick();",100f); 13 } 14 window.onload=tick; 15 </script> 16 </body> 17 </html>