HTML tabindex 屬性
實例
帶有指定 tab 鍵順序的鏈接:
<a href="http://www.dbjr.com.cn/"tabindex="2"
>W3School</a> <a href="http://www.google.com/"tabindex="1"
>Google</a> <a href="http://www.microsoft.com/"tabindex="3"
>Microsoft</a>
瀏覽器支持
幾乎所有瀏覽器均 tabindex 屬性,除了 Safari。
定義和用法
tabindex 屬性規(guī)定元素的 tab 鍵控制次序(當 tab 鍵用于導(dǎo)航時)。
提示和注釋
注釋:以下元素支持 tabindex 屬性:<a>, <area>, <button>, <input>, <object>, <select> 以及 <textarea>。
語法
<element tabindex="number"
>
屬性值
值 | 描述 |
---|---|
number | 規(guī)定元素的 tab 鍵控制次序(1 是第一個)。 |