<body οnlοad="countTime()">
<script> function countTime(){ //显示倒计时 for(var i=10,j=1;i>0,j<11;i--,j++){ setTimeout("javascript:document.getElementById('count_time').innerHTML='还剩"+i+"秒……'",j*1000); } //10秒结束后清空 setTimeout("javascript:document.getElementById('count_time').innerHTML=''",11000);}
</script> <div id='count_time'></div> </body> 李汉团 Mar 2,2012