August 1999
Intermediate to advanced
1488 pages
72h 53m
English
window.blur()
The blur() method of the Window object removes the focus from the window. Be careful when using this method in conjunction with the focus() method of objects. It can lead to a focus/blur loop, where the browser blurs a focus as soon as it is done, and vice versa.
Listing 7.527 has two buttons. When the user clicks the Open button, a second, smaller window is opened. If the Blur button is clicked, the focus is removed from the parent window and placed on the child window.
<html> <head> <title>Using the blur() Method</title> <script language="JavaScript"> <!-- ... |
Read now
Unlock full access