HTML DOM tabIndex Property
Complete Checkbox Object Reference
Definition and Usage
The tabIndex property sets or returns the tab order for a checkbox.
The tab order is the order the elements appear if you navigate the page using
the "tab" button on the keyboard.
Syntax
checkboxObject.tabIndex=number
|
Example
The following example changes the tab index of the checkboxes:
<html>
<head>
<script type="text/javascript">
function changeTabIndex()
{
document.getElementById('check3').tabIndex="1"
document.getElementById('check1').tabIndex="3"
}
</script>
</head>
<body>
<form>
<input type="checkbox" id="check1" tabIndex="1" /><br />
<input type="checkbox" id="check2" tabIndex="2" /><br />
<input type="checkbox" id="check3" tabIndex="3" /><br />
<input type="button" onclick="changeTabIndex()"
value="Change tabIndex" />
</form>
</body>
</html>
|
Try-It-Yourself Demos
Change the tab order of checkboxes
Complete Checkbox Object Reference
|
|
Get Your Diploma!
W3Schools' Online Certification Program is the perfect solution for busy
professionals who need to balance work, family, and career building.
The HTML Certificate is for developers who want to document their knowledge of HTML, XHTML, and CSS.
The JavaScript Certificate is for developers who want to document their knowledge of JavaScript and the HTML DOM.
The XML Certificate is for developers who want to document their knowledge of XML, XML DOM and XSLT.
The ASP Certificate is for developers who want to document their knowledge of ASP, SQL, and ADO.
The PHP Certificate is for developers who want to document their knowledge of PHP and SQL (MySQL).
|
|