<input> - button

HTML DOM Button object

Button object

A Button object represents a button in an HTML document.

This element has no default behavior, but must have an onclick event handler in order to use it.

Each time the <input type="button"> tag appears in an HTML document, a Button object is created.

You can access a button by iterating over the form's elements[] array, or by using document.getElementById().

Button object attributes

W3C: W3C standard.

disabledSets or returns whether to disable the button.Yes
formReturns a reference to the form object that contains the button.Yes
nameSets or returns the name of the button.Yes
typeReturns the form element type of the button.Yes
valueSets or returns the text that appears on the button.Yes

Standard Properties and Events

Button objects also support standard properties and events .