我有一个 form
,其中有几个 input
和 select
元素.我的问题是我可以使用选项卡在 input
元素之间移动,但不能使用 select
下拉菜单.我试过 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.
有没有办法做到这一点?
Is there way to do this?
这是我的代码示例.如果它改变了我在 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 上,您现实生活示例页面中的 select
元素 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 版本之后,您还应该使用 HTML W3C 验证器修复标记.该页面现在声明了 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.)
这篇关于选项卡以<选择>html中的输入元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!