please dont rip this site

JavaScript: The Definitive Guide

Previous Chapter 21
JavaScript Reference
Next
 

Element.blur() Method

Name

Element.blur() Method---remove keyboard focus from a form element

Availability

Navigator 2.0, Internet Explorer 3.0

Synopsis

element.blur()

Arguments

none

Returns

nothing

Description

The blur() method of a form element removes keyboard focus from that element without invoking the onblur() event handler; it is essentially the opposite of the focus() method. The blur() method does not transfer keyboard focus anywhere, however, so the only time that it is actually useful to call this method is directly before you plan to transfer keyboard focus elsewhere with the focus() method, when you don't want the onblur() event handler to be triggered. That is, by removing focus explicitly from the element, you won't be notified when it is removed implicitly by a focus() call on another element.

In fact, because it is poor user-interface design to remove keyboard focus without transferring it somewhere else, Internet Explorer 3.0 does not actually remove keyboard focus when you call blur(). Instead, on this platform, calling blur() on a form element simply puts that element in a special state so that it won't trigger its onblur() event handler when focus actually is transferred somewhere else (either by the program or by the user.) Since this is the only reasonable use for blur() anyway, this incompatibility should not be a problem.

All form elements other than Hidden support the blur() method. Unfortunately, not all platforms support keyboard navigation equally well. In Navigator 2.0 and 3.0 for Unix platforms, the blur() method is only functional for those form elements that display text: Text, Textarea, Password and FileUpload.

See Also

"Element", "Element.focus()", "Element.onblur()"


Previous Home Next
Element Book Index Element.checked

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

file: /Techref/language/java/SCRIPT/definitive/refp_98.htm, 6KB, , updated: 2019/10/14 15:00, local time: 2024/12/11 14:09,
TOP NEW HELP FIND: 
3.138.181.127: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://sxlist.com/Techref/language/java/SCRIPT/definitive/refp_98.htm"> [Chapter 21] Reference: Element.blur()</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 sxlist.com!


Site supported by
sales, advertizing,
& kind contributors
just like you!

Please don't rip/copy
(here's why

Copies of the site on CD
are available at minimal cost.
 

Welcome to sxlist.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .