Reset.onClick
JavaScript 1.1+, JScript 1.0+ Nav3+, IE 3+, Opera3+ Syntax
onClick="command"
Description
The onClick property is an event handler used to handle the event of a mouse click on the Reset button.
Example
Listing 7.452 shows an example of how the onClick event handler is used.
Listing 7.452 Example of the onClick Event Handler
<html> <head> <title> Example of the reset onClick event handler</title> </head> <body> <form name="form1"> Enter Name: <input type="text" Name="name" Size=15> <br> Enter Phone: <input type="text" Name="phone" Size=10> <br><br> <input type="reset" name=resetbutton value=Reset onClick='alert("The reset button was clicked")'> <br> <br> </form> lt;/body> </html> |
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.