标签到< select>输入元素在html
我有一个表单
,其中有几个输入
和选择
元素。我的问题是,我可以使用标签在输入
元素之间移动,但不能使用选择
下拉菜单。我试过 tabindex =2
属性,但它并没有影响任何东西。
I have a form
, and within it several input
and select
elements. My problem is that I can use tab to move between input
elements, but not the select
drop down menu. I tried tabindex="2"
attribute, but it didn't affect anything.
有没有办法这个?
这是我的代码示例。如果它改变了我在php中的任何东西,但是我无法在html ether中找到它。
Here is a sample of my code. If it changes anything I'm in php, but I'm not able to get it to tab in html ether.
<table>
<tr>
<td>
<select>
<option value="volvo">Volvo</option><option value="saab">Saab</option><option value="mercedes">Mercedes</option><option value="audi">Audi</option>
</select></td><td>
<input type="text" name="location" size=17 maxlength=22/>
</td><td>
<input type="text" name="date" size=12 maxlength=10/>
</td>
</tr>
</table>
我希望我发布了这个版本,我很难用代码。
I hope I posted this right I'm have a hard time with the code.
在Firefox上,例如,选择
a href =http://cafe.bg14.com/purchases.php =nofollow> http://cafe.bg14.com/purchases.php 可以标签到,它只是在标签顺序的晚期。原因是您为某些表单字段但不是全部设置 tabindex
属性。没有属性的那些人将会来。
On Firefox, for example, the select
element on your real life sample page http://cafe.bg14.com/purchases.php can be tabbed to, it’s just late in the tabbing order. The reason is that you are setting tabindex
attribute for some form fields but not all. Those without the attribute will come last.
删除所有 tabindex
属性(如果自然选项顺序,按顺序在HTML标记中,可以),或者将它们用于应该参与制表的所有字段和其他项目。
Either remove all tabindex
attributes (if the natural tabbing order, by order in HTML markup, is OK), or use them for all fields and other items that should participate in tabbing.
您还应使用HTML W3C验证器修复标记,在决定要使用哪个版本的HTML之后。该页面现在声明XHTML 1.0,但使用未引用的属性值和HTML5功能。这使得更难看出存在严重的标记错误,如 th
元素未包含在 tr
元素内。 (打破HTML表模型可能会对渲染和功能产生影响。)
You should also fix the markup, using HTML W3C validator, after deciding which version of HTML you wish to use. The page now declares XHTML 1.0 but uses unquoted attribute values and HTML5 features. This makes it more difficult to see that there are serious markup errors, like th
elements not wrapped inside a tr
element. (Breaking the HTML table model may have an impact on both rendering and functionality.)