从Tab键顺序中明确排除一个html元素 [英] Explicitly exclude an html element from the tab order
本文介绍了从Tab键顺序中明确排除一个html元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
$ b 有没有必要从HTML表单的Tab键顺序排除元素。 $ b
< 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,我不想为所有的字段编号。我的应用程序是动态创建字段。
谢谢
Jason
tabindex 设置为 -1 会导致元素无法访问(如果这是一个字):)
< input type =textname =usernametabindex = - 1/>
Is there anyway to exclude an element from the tab order of a HTML form.
So if i have the following
<input type=text name=username>
<input type=text name=password>
<input type=button name=forgotpassword>
<input type=submit name=login>
I'm aware that I can use tabindex as 1,2,3,4 but i don't want to have to number all the fields. My application is dynamically creating the fields.
Thanks
Jason
解决方案
Setting the tabindex
to -1 will render an element untabbable (if that's a word) :)
<input type="text" name="username" tabindex="-1" />
这篇关于从Tab键顺序中明确排除一个html元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文