August 2006
Intermediate to advanced
1018 pages
34h 13m
English
Input.focus( ): give keyboard focus to a form element — DOM Level 2 HTML
void focus( )
The focus( ) method of a
form element transfers keyboard focus to that element and triggers
any onfocus event handlers that were registered on the element. That
is, it makes the element active with respect to keyboard navigation
and keyboard input. Thus, if you call focus( ) for an input element of type
“text”, any text the user subsequently types appears in that text
element. Or, if you call focus( )
for an element of type “button”, the user can then invoke that
button from the keyboard.
Read now
Unlock full access