Propriété tabIndexdu DOM HTML

元素对象参考手册Objet Element


Définition et utilisation

La propriété tabIndex peut définir ou renvoyer l'ordre de tabulation du bouton radio.

Syntaxe

HTMLElementObject.tabIndex=tabIndex


Prise en charge des navigateurs

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Tous les principaux navigateurs prennent en charge la propriété tabIndex.


Exemple

Exemple

Modifier l'ordre de tabulation de trois liens :

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Tutoriel d'exemple (example.com)</title> <script> function changeTabIndex() { document.getElementById('1').tabIndex="3" document.getElementById('2').tabIndex="2" document.getElementById('3').tabIndex="1" } </script> </head> <body> <p><a id="1" href="https://www.example.com">1</a></p> <p><a id="2" href="https://www.example.com">2</a></p> <p><a id="3" href="https://www.example.com">3</a></p> <input type="button" onclick="changeTabIndex()" value="Modifier TabIndex"> </body> </html>

Essayez-le vous-même »


元素对象参考手册Objet Element

Autres extensions