59

无论如何要从 HTML 表单的选项卡顺序中排除一个元素。

所以如果我有以下

<input type=text name=username>
<input type=text name=password>
<input type=button name=forgotpassword>
<input type=submit name=login>

我知道我可以将 tabindex 用作 1、2、3、4,但我不想对所有字段进行编号。我的应用程序正在动态创建字段。

谢谢

杰森

4

1 回答 1

146

设置tabindex-1将呈现一个元素不可标记(如果这是一个词):)

<input type="text" name="username" tabindex="-1" />
于 2010-10-09T04:34:52.557 回答