HTML DOM tabIndex Property
Complete Password Object Reference
Definition and Usage
The tabIndex property sets or returns the tab order for a password field.
The tab order is the order the password field appear if you navigate the page
using the "tab" button on the keyboard.
Syntax
passwordObject.tabIndex=number
|
Example
The following example shows the tab order for the form elements:
<html>
<head>
<script type="text/javascript">
function showTabIndex()
{
var email=document.getElementById('email').tabIndex;
var pwd=document.getElementById('pwd').tabIndex;
document.write("Tab index of email field: " + email);
document.write("<br />");
document.write("Tab index of password field: " + pwd);
}
</script>
</head>
<body>
<form>
Email: <input type="text" id="email" tabindex="1" />
<br />
Password: <input type="password" id="pwd" tabindex="2" />
<br />
<input type="button" onclick="showTabIndex()"
value="Show tabIndex" />
</form>
</body>
</html>
|
Try-It-Yourself Demos
Show the tab order of form elements
Complete Password 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).
|
|