August 1999
Intermediate to advanced
1488 pages
72h 53m
English
document.form.button.focus()
The focus() method applies focus to the button without invoking the button's onFocus event handler.
Warning
In the UNIX versions of Navigator 2 and Navigator 3, the focus() method does not work for buttons.
In Listing 7.24, two buttons are created to demonstrate focus. Choosing the second button causes the focus to shift to the first button instead of the focus staying on the second button, thanks to the focus() method.
<html> <h2>The Button Focus Game</h2> Click both buttons. Notice that when the second button is clicked focus is shifted to the first ... |
Read now
Unlock full access