Availability
JavaScript 1.0
Synopsis
input.focus( )Description
The focus( ) method
of a form element transfers keyboard focus to that element without
calling the onfocus event handler. That is, it
makes the element active with respect to keyboard navigation and
keyboard input. Thus, if you call focus( ) for a
Text element, any text the user types appears in that text element.
Or, if you call focus( ) for a Button element, the
user can invoke that button from the keyboard.
All form elements except the Hidden element support the
focus( ) method. Unfortunately, not all platforms
support keyboard navigation equally well. In Unix versions of
Netscape, focus( ) is functional only for those
form elements that display text: Text, Textarea, Password, and
FileUpload.
•
Table of Contents
•
Index
•
Reviews
•
Examples
•
Reader Reviews
•
Errata
JavaScript: The Definitive Guide, 4th Edition
By
David Flanagan
Publisher
: O'Reilly
Pub Date
: November 2001
ISBN
: 0-596-00048-0
Pages
: 936
Slots
: 1
This fourth edition of the definitive reference to
JavaScript, a scripting language that can be embedded
directly in web pages, covers the latest version of the
language, JavaScript 1.5, as supported by Netscape 6 and
Internet Explorer 6. The book also provides complete
coverage of the W3C DOM standard (Level 1 and Level 2),
while retaining material on the legacy Level 0 DOM for
backward compatibility.