2012-11-28 25 views

回答

0

您可以通過屬性管理它tabIndex

比方說,你的新形式有三種輸入框

<input type="text" tabIndex="31" name="inp1" id="inp1"> 
<input type="text" tabIndex="32" name="inp2" id="inp2"> 
<input type="text" tabIndex="33" name="inp3" id="inp3" onBlur="tabIndexToFirst()"> 

現在,當你到達最後一個表單元素和壓片,你需要跳轉到第表單元素。

JS

function showNewForm() { 
document.getElelmentById('inp1').focus(); 
} 
function tabIndexToFirst() { 
document.getElelmentById('inp1').focus(); 
}