HTML DOM tabIndexPropiedad

元素对象参考手册Objeto del elemento


Definición y uso

La propiedad tabIndex establece o devuelve el orden de control de tabulación del botón de opción.

Sintaxis

HTMLElementObject.tabIndex=tabIndex


Soporte del navegador

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Todos los navegadores principales son compatibles con la propiedad tabIndex.


Ejemplo

Ejemplo

Cambiar el orden de tabulación de tres enlaces:

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Ejemplo (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="Change TabIndex"> </body> </html>

Pruébalo »


元素对象参考手册Objeto del elemento

Otras extensiones