HTML DOM Button object
Button Object
The Button object represents a button in an HTML document.
This element has no default behavior, but must have an onclick event handler to be usable.
In an HTML document, A Button object is created each time the
You can access a button by iterating through the form's elements[] array, or by using document.getElementById().
Button object properties
W3C: W3C standard.
| property | Description | W3C |
|---|---|---|
| disabled | Sets or returns whether the button is disabled. | 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 displayed on the button. | Yes |
Standard properties and events
The Button object also supports standardproperty and Events.