input type="reset" ElementThe input type="reset" element is an inline element declared by the XHTML 1.1 Forms Module
Elements in the Forms Module are:form | label | textarea | select | optgroup | option | button | fieldset | legend | input type="button" | input type="checkbox" | input type="file" | input type="hidden" | input type="image" | input type="password" | input type="radio" | input type="reset" | input type="submit" | input type="text"
The input type="reset" element may be
used within a form to create
a reset button which, when activated by the user, will reset all the
form's controls to the state they were in when the form was first rendered,
discarding any user modifications.
The input type="reset" button's text is given
by the contents of its value
attribute (or some browser default text - usually "Reset" -
if no value
attribute is specified).
On form reset, only those checkboxes
(see input type="checkbox")
and radio buttons
(see input type="radio")
which were given the checked
attribute will be checked. Similary, only those
option elements which were given
the selected
attribute will be selected. Any file upload choices made using an
input type="file" element
will be removed and any fields containing text
(i.e. input type="text",
input type="password" and
textarea controls)
will be returned to their initial values (given by
the value
attribute or, in the case of textarea,
by the element's content).
The decision on whether to include a reset button in a form should be made on
a case-by-case basis. For very short forms, it is probably easier for the user
just to amend each choice individually. For very long forms,
particularly those containing textarea
elements, where a large amount of data may have been entered by the user, an
accidental press of a reset button (which looks very much like a submit button at
first glance) may wipe out many minutes of work without the possibility of
undoing the reset. Scripting may of course be used to bring up a dialogue asking
the user to confirm the reset, but not all users will have scripting enabled.
Note: No name=value pair is sent to the processing URI for an
input type="reset" element.
See also the button element.
In Internet Explorer, for reasons unknown, buttons with long text content are usually rendered
with excessive horizontal padding - the longer the button text, the more excessive the padding.
This annoyance can be avoided by using the CSS declarations
width:auto; overflow:visible; and setting the padding
property to the desired value.
Although the type attribute is not #REQUIRED
on the input element, its default value is "text" and so must be present on input type="reset".
input type="reset" element are listed below:accesskey [ type Character ]disabled [ type Boolean ]name [ type CDATA ]name attribute is usually only used to refer to the button from within scripts.tabindex [ type Number ]value [ type CDATA ]onblur [ type Script ]onfocus [ type Script ]input type="reset" element are listed below:class [ type NMTOKENS ]id [ type ID ]style [ type CDATA ], from the Style Attribute Module (deprecated)title [ type Text ]xmlns [ type URI - #FIXED 'http://www.w3.org/1999/xhtml' ]dir [ type Enumeration (ltr | rtl) ], from the Bi-directional Text Modulexml:lang [ type LanguageCode ]All attributes in the
Events Attribute Collection
are supported:onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
input type="reset" element is:
EMPTY
See Content Model & Nesting for information about Content Model syntax and Nesting Groups.
input type="reset"This element is empty and may have no children.
input type="reset"abbr, acronym, address, cite, code, dfn, div, em, h1 - h6, kbd, p, q, samp, span, strong, varadd, dt, licaption, td, thfieldset, label, legendb, big, i, small, sub, sup, ttdel, insbdoobjectrb, rt