HTML and CSS Reference
In-Depth Information
The second example HTML button has a value attribute that makes the
displayed button's label "Order Kumquats" but, like the first example,
does not include the button's value in the form's parameter list.
The last example, in XHTML, sets the button label and makes it part of
the form's parameter list. When the user clicks this submission button,
it adds the parameter ship_style="Ship Overnight" to the form's para-
meter list.
9.5.4.2. Reset buttons
The reset type of form <input> button is nearly self-explanatory: it lets
the user reseterase or set to some default valueall elements in the form.
Unlike the other buttons, a reset button does not initiate form process-
ing. Instead, the browser does the work of resetting the form elements.
The server never knows (or cares, for that matter) whether or when the
user selects a reset button.
By default, the browser displays a reset button with the label "Reset."
You can change that by specifying a value attribute with your own but-
ton label.
Here are two sample reset buttons:
<input type=reset>
<input type="reset" value="Use Defaults" />
The first one, in HTML, creates a reset button that is by default labeled
"Reset" by the browser. The second example, in XHTML, tells the
browser to label the reset button with "Use Defaults." Both examples
initiate the same response in the browser by resetting the form to its
original contents.
 
Search WWH ::




Custom Search