please dont rip this site

JavaScript: The Definitive Guide

Previous Chapter 21
JavaScript Reference
Next
 

Element.focus() Method

Name

Element.focus() Method---give keyboard focus to a form element

Availability

Navigator 2.0, Internet Explorer 3.0

Synopsis

element.focus()

Arguments

none

Returns

nothing

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 the active one with respect to keyboard navigation and keyboard input. Thus, if you call focus() for a Text element, then any text the user types will appear in that text element. Or, if you call focus() for Button element, then the user will be able to 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 Navigator 2.0 and 3.0 for Unix platforms, the focus() method is only functional for those form elements that display text: Text, Textarea, Password and FileUpload.

See Also

"Element", "Element.blur()", "Element.onfocus()"


Previous Home Next
Element.defaultValue Book Index Element.form

HTML: The Definitive Guide CGI Programming JavaScript: The Definitive Guide Programming Perl WebMaster in a Nutshell

file: /Techref/language/JAVA/script/definitive/refp_103.htm, 5KB, , updated: 2019/10/14 15:00, local time: 2024/11/25 18:02,
TOP NEW HELP FIND: 
18.118.119.77:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://ecomorder.com/techref/language/JAVA/script/definitive/refp_103.htm"> [Chapter 21] Reference: Element.focus()</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to ecomorder.com!

 

Welcome to ecomorder.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .