<div class="codetitle"> <span><a style="CURSOR: pointer" data="80144" class="copybut" id="copybut80144" onclick="doCopy('code80144')"><u>复代码</u></a></span> 代码如下:</div> <div class="codebody" id="code80144"> <br><div> <br><양식> <br><input name="a" tab="1" /> <br><input name="a" tab="3" /> <br><input name="a" tab="2" /> <br><input name="a" tab="5" /> <br><input name="a" tab="4" /> <br><input type="submit" value="submit" /> <br></form> <br></div> <br><script type="text/javascript"> <br>var inputs = document.getElementsByTagName("input"); <br>for (i = 0; i < inputs.length; i ) { <BR>inputs[i].onkeydown = function(e){ <BR>if (e.keyCode == 13) { <BR> var input = getInputByTab(parseInt(this.getAttribute("tab")) 1); <BR>if (입력) { <BR>input.focus(); <BR>거짓을 반환합니다. <BR>} <BR>} <BR>} <BR>} <BR>function getInputByTab(t) { <BR>for (i =0; i < inputs.length; i ) { <BR>if (입력 [i].getAttribute("tab") == t) <BR>입력 반환[i]; <BR>} <BR>false를 반환합니다. <BR>} <BR></script> <br> </div>