asp.net.ph

Skip Navigation LinksHome > Abakada: Back to Basics > Language References > HTML Element Attributes > TYPE Attribute

TYPE Attribute | type Property


Specifies the visual appearance and default behavior of a BUTTON element.

Syntax

Inline <BUTTON TYPE = 'button' | 'reset' | 'submit'...>
Script [ sType = ] button.type

Possible Values

button 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 with a default value of button.

Remarks

A Submit button has the same default behavior as the button created using the submit type with the INPUT object. When a control in the form ( other than another button ) has the input focus, the Submit button receives a bold border, and the user can "click" the button by pressing the ENTER key. If the Submit button has a name property, the button contributes a name/value pair to the submitted data.

Applies To

BUTTON



Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note