<htmlxmlns="http://www.w3.org/1999/xhtml"><headrunat="server"><title>定时器案例</title><script>varmyCount=5;functioncount(){document.getElementById("test").innerText=myCount+"秒后隐藏";myCount--;if(myCount==0){document.getElementById("test").innerHTML="已经隐藏";document.getElementById("tcdiv").style.display="none";return;}setTimeout("count()",1000);}</script></head><bodyonLoad="setTimeout('count()',10);"><formid="form1"runat="server"><divid="test"></div><divid="tcdiv"></div></form></body></html>