Reset.onFocus

JavaScript 1.2+, ECMAScript 1.0+, JScript 1.0+ Nav4+, IE 3+ Syntax

onFocus="command"

Description

The onFocus event handler is used to specify when the focus is set on the Reset button.

Example

Listing 7.453 shows the onFocus event handler being used to inform the user when the focus is set.

Listing 7.453 Example of the onFocus Event Handler
 <html> <head> <title> Example of the reset onFocus event handler</title> </head> <body> <script language="JavaScript"> <!-- Hide function setMsg(){ document.form2.text1.value = "Focus is set on the reset button."; } // End Hide ---> </script> <form name="form1"> Click the reset button. <br><br> Enter Name: <input type="text" Name="name" Size=15> <br> Enter Phone: <input type="text" ...

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.