<div class="codetitle"> <span><a style="CURSOR: pointer" data="16283" class="copybut" id="copybut16283" onclick="doCopy('code16283')"><u>複製代碼</u></a></span>如下代碼:</div> <div class="codebody" id="code16283"> <br>渡//EN" <br><br>"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <br> <br> <br><title>js 切換工件</title>; <br> <br>var t; <br>函數a() <br>{ <br>document.getElementById('input1').focus(); <br>t=setTimeout("b()",3000); <br>//clearTimeout(t); <br>//document.getElementById('input2').focus(); <br>//document.getElementById('input1').focus(); <br>} <br>函數b() <br> { <br>clearTimeout(t); <br>document.getElementById('input2').focus(); <br>} <br>function c() <br>{ <br>setTimeout("document.getElementById(>{ <br>setTimeout("document.getElementById( 'input3').focus()",500); <br>} <br>腳本> <br>頭> <br> <br><input id="testButton" type=" button" onclick="a()" value="btn1">; <br> <br> <br><br><input id="testButton1" type="button" onclick="c()" value="btn2"> <br> <br>身體> <br> </div> <br> 曼谷停留一段時間,跳到別一個方本箱子去…