HTML and CSS Reference
EXPLANATION ( CONTINUED )
The input type is a simple graphical button containing the text “Click me!”
When the user clicks the button, the onClick event handler is triggered and the
function called greetme() is called. It will send an alert dialog box to the screen, as
shown in Figure 11.22.
Figure 11.22 Using a button to call a function.
methods for the forms object, the submit() and the reset() methods. These methods emu-
late the event handlers of the same name: The submit() method submits the form just as
though the user had clicked the submit button, and the reset() method resets the form
elements to their defaults just as if the user had clicked the reset button. Neither of these
methods trigger the onSubmit or onReset event handlers. (Note that the methods must
be spelled with lowercase letters.) These methods allow you to ask for user confirma-
tion, check input data, and so on, before sending the form to the server for processing.
<head><title>An HTML Form</title></head>
<fieldset><legend><big> All About You</legend>
<p><font size=3 color="blue">
Type your name here: