August 1999
Intermediate to advanced
1488 pages
72h 53m
English
text.blur()
The blur() method of the Text object removes focus from the text box. Be careful when using this method in conjunction with the Text.focus() 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.493 has a text box and a button. If the user highlights some of the text in the box and then clicks the Click Here to Remove Focus button, the text will no longer be highlighted.
<html> <head> <script language="JavaScript"> <!-- Hide // Define the removeFocus function called by pressing the button function ... |
Read now
Unlock full access