第一个题:html计时器
方法一:
<body onLoad="show()" > <div id="b"></div> </body> </html> <script type="text/javascript"> function show() {var d=new Date(); var now=""; now=d.getFullYear()+"年"; now+=(d.getMonth()+1)+"月"; now+=d.getDate()+"日"; now+=d.getHours()+"时"; now+=d.getMinutes()+"分"; now+=d.getSeconds()+"秒"; document.getElementById("b").innerHTML=now; setTimeout("show()",1000) }