August 1999
Intermediate to advanced
1488 pages
72h 53m
English
textarea.focus()The focus() method of the Textarea object gives the focus to the text area. Be careful when using this method in conjunction with the Textarea.blur() method. 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.509 has two text areas and two buttons. If the user clicks the first button, the cursor is set inside the first text area. If the user clicks the second text box, the cursor is set inside the second text area.
<html> <head> <script language="JavaScript"> <!-- Hide // Define the ... |
Read now
Unlock full access