Explicitly exclude an html element from the tab order

拜拜、爱过 提交于 2019-12-09 07:26:58

问题


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


回答1:


Setting the tabindex to -1 will render an element untabbable (if that's a word) :)

<input type="text" name="username" tabindex="-1" />


来源:https://stackoverflow.com/questions/3895710/explicitly-exclude-an-html-element-from-the-tab-order

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!