Checkbox.blur()

JavaScript 1.1+, JScript 3.0+ Nav3+, IE 4+ Syntax

document.form.
							checkbox.blur()

Description

The blur() method removes the focus from a check box.

Warning

In the UNIX versions of Navigator 2 and Navigator 3, the blur() method does not work for check boxes.

Example

In Listing 7.36, two check boxes are created by using the <input> tag. The first check box retains focus after being clicked, but the second check box loses focus as soon as it is clicked due to the use of the blur() method. Do not be surprised if you do not see a difference between the check boxes in this example. In most browsers, you will not be able to detect the difference between a check box that is focused versus one that is not focused. For this reason, ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.