<label>
¢<label for=”Uname”>User
name</label>
¢For controls
that do not have a label, you should use the <label> element. This
element does not affect the form in any way other
than telling users what information they should be entering
Tabbing Order
ØIf you want to
control the order in which elements can gain focus, you can use the tabindex
attribute to give that element a number between 0 and 32767, which forms
part of the tabbing order. Every time the user presses
the Tab key, the focus moves to the element with the next highest tabbing order
(and again, Shift+Tab moves
focus in reverse order).
ØThe following
elements can carry a tabindex attribute:
<a> <button>
<input> <object> <select> <textarea>
Tabbing Order Example:
<form name=”frmTabExample”>
<input
type=”checkbox” name=”chkNumber” value=”1” tabindex=”3”
/> One<br />
<input
type=”checkbox” name=”chkNumber” value=”2” tabindex=”7”
/> Two<br />
<input
type=”checkbox” name=”chkNumber” value=”3” tabindex=”4”
/> Three<br />
<input
type=”checkbox” name=”chkNumber” value=”4” tabindex=”1”
/> Four<br />
<input
type=”checkbox” name=”chkNumber” value=”5” tabindex=”9”
/> Five<br />
<input
type=”checkbox” name=”chkNumber” value=”6” tabindex=”6”
/> Six<br />
<input
type=”checkbox” name=”chkNumber” value=”7” tabindex=”10”
/>Seven <br />
<input
type=”checkbox” name=”chkNumber” value=”8” tabindex=”2”
/> Eight<br />
<input
type=”checkbox” name=”chkNumber” value=”9” tabindex=”8”
/> Nine<br />
<input
type=”checkbox” name=”chkNumber” value=”10” tabindex=”5”
/> Ten<br />
<input
type=”submit” value=”Submit” />
</form>
0 comments:
Post a Comment