标签到< select>输入元素在html

编程入门 行业动态 更新时间:2024-10-27 01:24:50
本文介绍了标签到< 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 =cafe.bg14/purchases.php =nofollow> cafe.bg14/purchases.php 可以标签到,它只是在标签顺序的晚期。原因是您为某些表单字段但不是全部设置 tabindex 属性。没有属性的那些人将会来。

On Firefox, for example, the select element on your real life sample page cafe.bg14/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.)

更多推荐

标签到&lt; select&gt;输入元素在html

本文发布于:2023-10-31 01:56:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1544647.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:元素   标签   amp   select   lt

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!