<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.
Attribute | Description | W3C |
---|---|---|
disabled | Sets or returns whether to disable the button. | Yes |
form | Returns a reference to the form object that contains the button. | Yes |
name | Sets or returns the name of the button. | Yes |
type | Returns the form element type of the button. | Yes |
value | Sets or returns the text that appears on the button. | Yes |
Standard Properties and Events
Button objects also support standard properties and events .