Retrieves the classification and default behavior of the button.
Syntax
| HTML | <BUTTON TYPE
= sType... >
|
|---|
| Scripting | [ sType = ] BUTTON.type |
|---|
Possible Values
| sType | String that
receives one of the following values.| button | Default. Creates a Command button. | | reset | Creates a Reset button. If it's in a form, this button resets the fields in the form to their initial values. | | submit | Creates a Submit button. If it's in a form, this button submits the form. |
|
The property is read-only.
The property has a default value of
button.
Remarks
A Submit button has the same default behavior as a button created using the submit?A HREF="../properties/type_7.html">type with the input object. If a user presses the ENTER key while viewing a form that contains a Submit button, the form is submitted. This default behavior of a Submit button is indicated by a border surrounding the button. The border appears when any control within the form receives the focus, other than another button. If the Submit button has a name property, the button contributes a name/value pair to the submitted data.
Standards Information
This property is defined in
HTML 4.0
and
is defined in
World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1
.
Applies To