<div class="codetitle"> <span><a style="CURSOR: pointer" data="32915" class="copybut" id="copybut32915" onclick="doCopy('code32915')"><u>复制代</u></a></span> 代码如下:</div> <div class="codebody" id="code32915"> <br><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <BR><html xmlns="http://www.w3.org/1999/xhtml"> <br> <br><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <br><title>タイムアウト</title> <br></head> <br><body onload="countSecond()"> <br><input type="text" id="time" style="border:0px;" size="1px"> <br></body> <br></html> <br> <br>x = 0 <br>function countSecond() <br>{ x = x 1 <br> document.getElementById("time").value=x; <br> setTimeout("countSecond()", 1000) <br>} <br></script> <br> </div>