Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

type attribute | type property

Gets the classification and default behavior of the button.

Syntax

HTML<element type="p" ... >
JavaScript

p = object.type

Property values

Type: String

button

Default. Creates a Command button.

reset

Creates a Reset button. If the button is in a form, it resets the fields in the form to their initial values.

submit

Creates a Submit button. If the button is in a form, it submits the form.

Remarks

A Submit button has the same default behavior as a button created by using the submit type with the input object. If the ENTER key is pressed while a user is 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 in 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.

See also

button

 

 

Show:
© 2014 Microsoft