HTML DOM tabIndex Property
Complete Select Object Reference
Definition and Usage
The tabIndex property sets or returns the tab order for a dropdown list.
The tab order is the order the dropdown list appear if you navigate the page
using the "tab" button on the keyboard.
Syntax
selectObject.tabIndex=number
|
Example
The following example displays the tab index of a text field and a dropdown
list:
<html>
<head>
<script type="text/javascript">
function showTabIndex()
{
var email=document.getElementById('email').tabIndex;
var sex=document.getElementById('sex').tabIndex;
document.write("Tab index of email field: " + email);
document.write("<br />");
document.write("Tab index of dropdown list: " + sex);
}
</script>
</head>
<body>
<form>
Email: <input type="text" id="email" tabindex="1" />
<br />
Sex:
<select id="sex" tabindex="2">
<option>Male</option>
<option>Female</option>
</select>
<br /><br />
<input type="button" onclick="showTabIndex()"
value="Show tabIndex" />
</form>
</body>
</html>
|
Try-It-Yourself Demos
Show
the tab index of form fields
Complete Select Object Reference
Want To Be A Web Master?
If you want to be a Web Master, you will have to host your web site with an ISP (Internet Service Provider).
MaximumASP offers seven different configurations of dedicated servers to meet your Windows and .NET hosting needs.
Hosted on our multi-tiered Enterprise Class network, these servers provide the performance, security and reliability
you need to host your high end web sites and applications.
Visit MaximumASP
|