The HTMLElement.tabIndex
property represents the tab order of the current element.
Tab order is as follows:
Elements that are disabled do not participate in the tabbing order.
Values don't need to be sequential nor must they begin with any particular value, they may even be negative, though each browser trims very large values.
elt.tabIndex = index; var index = elt.tabIndex;
var b1 = document.getElementById("button1"); b1.tabIndex = 1;
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of 'tabindex' in that specification. | Living Standard | No change from Document Object Model (DOM) Level 2 HTML Specification. |
Document Object Model (DOM) Level 2 HTML Specification The definition of 'tabindex' in that specification. | Obsolete | No change from Document Object Model (DOM) Level 1 Specification. |
Document Object Model (DOM) Level 1 Specification The definition of 'tabindex' in that specification. | Obsolete | Initial definition. |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | ? | Yes | 1 | ? | ? | ? |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | Yes | Yes | Yes | 4 | ? | ? | ? |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/tabIndex