HTML and CSS Reference
EXAMPLE 11.12 ( CONTINUED )
onReset="return resetAll();" />
Enter your user id:
value="Name? " />
<p>Type your password:
The function called resetAll() is defined. It is invoked when the onReset event han-
dler is triggered.
If the user clicks the Reset button on line 8, he or she sees this confirm dialog box,
a true value will be returned by this function, allowing the reset to clear all the
input fields and set them back to their original values.
If a value true is returned, the fields will be cleared.
If a value of false is returned by this function, the reset action will be dismissed.
The form starts here. The onReset event handler is an attribute of the <form> tag.
The input types for this form are a text field and a password field.
The reset button is used to reset the form fields back to their original values.
When this button is clicked, the onReset event handler will be triggered. See