<div class="codetitle"> <span><a style="CURSOR: pointer" data="69128" class="copybut" id="copybut69128" onclick="doCopy('code69128')"><u>复制代码</u></a></span>代码如下:</div> <div class="codebody" id="code69128"> <br><head> <br> <br>function EnterPress(e){ //イベントを入力 <br>var e = e ||ウィンドウ.イベント; <br>if(e.keyCode == 13){ <br>document.getElementById("txtB").focus(); <br>} <br>} <br></script> <br></head> <br> <br><input type="text" id="txtA" onkeypress="EnterPress(event)" onkeydown="EnterPress()" /> <br><input type="text" id="txtB" /> <br></body> <br> </div>