使用TAB键导航到Mozilla Firefox中的HTML BUTTON或SELECT元素

时间:2010-01-20 23:28:47

标签: html firefox html-select htmlbutton

我该怎么办?我尝试将tabindex属性设置为无效。

3 个答案:

答案 0 :(得分:5)

如果您使用的是Mac,则需要打开Keyboard首选项面板,切换到Keyboard Shortcuts标签并选择:

"press Tab to move the keyboard focus between: (x) All controls"

答案 1 :(得分:0)

请发布您的代码。这是w3c(http://www.w3.org/TR/html401/interact/forms.html#h-17.10)的一个例子:

<FORM action="..." method="post">
 <P>
 <FIELDSET>
  <LEGEND>Personal Information</LEGEND>
  Last Name: <INPUT name="personal_lastname" type="text" tabindex="1">
  First Name: <INPUT name="personal_firstname" type="text" tabindex="2">
  Address: <INPUT name="personal_address" type="text" tabindex="3">
  ...more personal information...
 </FIELDSET>
 <FIELDSET>
  <LEGEND>Medical History</LEGEND>
  <INPUT name="history_illness" 
         type="checkbox" 
         value="Smallpox" tabindex="20"> Smallpox
  <INPUT name="history_illness" 
         type="checkbox" 
         value="Mumps" tabindex="21"> Mumps
  <INPUT name="history_illness" 
         type="checkbox" 
         value="Dizziness" tabindex="22"> Dizziness
  <INPUT name="history_illness" 
         type="checkbox" 
         value="Sneezing" tabindex="23"> Sneezing
  ...more medical history...
 </FIELDSET>
 <FIELDSET>
  <LEGEND>Current Medication</LEGEND>
  Are you currently taking any medication? 
  <INPUT name="medication_now" 
         type="radio" 
         value="Yes" tabindex="35">Yes
  <INPUT name="medication_now" 
         type="radio" 
         value="No" tabindex="35">No

  If you are currently taking medication, please indicate
  it in the space below:
  <TEXTAREA name="current_medication" 
            rows="20" cols="50"
            tabindex="40">
  </TEXTAREA>
 </FIELDSET>
</FORM>

答案 2 :(得分:0)

如果你知道一个(最好是简单的)页面,你可能想看看它们的来源。

此外,您确定您的HTML文档在尝试时具有键盘焦点吗?我问,因为我似乎记得我可以在纯HTML页面中使用TAB导航到这些元素,我没有做任何表示Tab键顺序或相似的内容。