Easy Tutorial
❮ Prop Html Tabindex Prop Keygen Disabled ❯

HTML DOM


Button Object

The Button object represents a button in the HTML document.

This element has no default behavior and must have an onclick event handler to be used.

Each occurrence of the <input type="button"> tag in the HTML document creates a Button object.

You can access a specific button by traversing 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 Attributes and Events

The Button object also supports standard attributes and events.

❮ Prop Html Tabindex Prop Keygen Disabled ❯