Submit.onBlur

JavaScript1.0+, JScript1.0+ Nav2+, IE3+, Opera3+ Syntax

onBlur="command"

Description

The onBlur event handler is fired when the focus is moved away from that particular submit button. Care should be taken when using this event handler, because it is possible to get into an infinite loop when using onFocus event handler or focus() method.

Example

Listing 7.486 contains two text boxes and a submit button. The button has the Blur event intercepted within its tag. The second text box is used for a counter for the number of times the onBlur event handler is fired.

In the script, the event calls a function that reassigns the submit button focus. The result of this is that when a user tries to click or tab away from the submit ...

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.