Quick References
ADO
ASP
CSS2
HTML
JavaScript
Jet SQL
VBScript
WML
WMLScript
WSH
XHTML
XML DOM
XSLT
Features
Knowledge Base
Tutorials
Partners
ZVON.ORG
XML
Planet Source Code
VisualBuilder
Web Design
Your HTML Source
XML/XSLT Forums
ASPAlliance
Scripts
Programmers Heaven
Tek-Tips Forums
Developer Fusion
Code Project
input tag
form tag
ATTRIBUTE: tabindex
tabindex="number"
The
tabindex
attribute specifies an integer that defines the rank in the tabbing order for the specified element when you use the keyboard to navigate (tab through) a page.
The lower the integer, the higher the ranking in the tabbing order. A higher rank is tabbed to before a lower rank. The integer cannot be negative or zero.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>DevGuru XHTML tabindex Attribute Example</title>
</head>
<body>
<form>
Place the cursor in the top input window.
<br />
Then type the <b>tab</b> button on the keyboard.
<br />
Note that after the "First Name" we jump over "Last Name" to "Maiden Name".
<br />
After "Maiden Name" we return up to "Last Name".
<br />
<hr />
<br />
First Name: (tabindex = 1)
<br />
<input type="text" name="firstlname" size="30"
tabindex="1"
/>
<br />
Last Name: (tabindex = 3)
</br>
<input type="text" name="lastname" size="30"
tabindex="3"
/>
<br />
Maiden Name: (tabindex = 2)
<br />
<input type="text" name="maidenname" size="30"
tabindex="2"
/>
</form>
</body>
</html>
Output:
Click to see and test output in separate window
Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information