2016-01-22 66 views
0

我有兩個領域,即手機號碼和密碼爲什麼TAB鍵不移動焦點到下一個文本字段

當關注的是手機號碼的文本字段,當用戶按下標籤關鍵的焦點是不移動到密碼字段??

這是我的HTML頁面

<div class="createAccountWrap"> 
    <div class="row-fluid"> 
     <label class="fieldLabel">Mobile Number</label> 
     <div class="insideInput"><input type="tel" placeholder="Mobile Number" maxlength="10" autocomplete="off" id="vmobilenum" name="vmobilenum" onkeypress="return isNumberKey(event)" required><a href="#" class=""></a></div> 
    </div> 
    <div class="row-fluid"> 
     <label class="fieldLabel">Password</label> 
     <div class="insideInput"><input type="password" placeholder="Password" autocomplete="off" id="vpwdcode" name="vpwdcode" onkeypress="return nospecialCharacters(event)" required><a href="#" class=""></a></div> 
    </div> 
</div> 

能否請你告訴我,爲什麼它不工作?

http://jsfiddle.net/Us8uc/4371/

回答

0

嘗試這種使用 「的tabindex」

<div class="createAccountWrap"> 
    <div class="row-fluid"> 
     <label class="fieldLabel">Mobile Number</label> 
     <div class="insideInput"><input tabindex="1" type="tel" placeholder="Mobile Number" maxlength="10" autocomplete="off" id="vmobilenum" name="vmobilenum" onkeypress="return isNumberKey(event)" required><a href="#" class=""></a></div> 
    </div> 
    <div class="row-fluid"> 
     <label class="fieldLabel">Password</label> 
     <div class="insideInput"><input tabindex="2" type="password" placeholder="Password" autocomplete="off" id="vpwdcode" name="vpwdcode" onkeypress="return nospecialCharacters(event)" required><a href="#" class=""></a></div> 
    </div> 
</div> 
相關問題