HTML DOM tabIndex property
Definition and Usage
tabIndex property sets or returns the radio button tab order.
grammar
HTMLElementObject.tabIndex=tabIndex
Browser Support
All major browsers support the tabIndex property
Examples
Examples
Sort tab to change the three links:
<html>
<head>
<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="http://www.w3cschool.cc">1</a></p>
<p><a id="2" href="http://www.w3cschool.cc">2</a></p>
<p><a id="3" href="http://www.w3cschool.cc">3</a></p>
<input type="button" onclick="changeTabIndex()"
value="Change TabIndex">
</body>
</html>
<head>
<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="http://www.w3cschool.cc">1</a></p>
<p><a id="2" href="http://www.w3cschool.cc">2</a></p>
<p><a id="3" href="http://www.w3cschool.cc">3</a></p>
<input type="button" onclick="changeTabIndex()"
value="Change TabIndex">
</body>
</html>
try it"