August 1999
Intermediate to advanced
1488 pages
72h 53m
English
window.focus()
The focus() method of the Window object places focus on the window. Be careful when using this method in conjunction with the blur() 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.539 has a button. When the user clicks the Open button, a second, smaller window is opened and the focus is placed back on the parent window.
<html> <head> </head> <script language="JavaScript1.1"> <!-- Hide // Define the openWin() function function openWin(){ // Create variables to hold the various ... |
Read now
Unlock full access