A graphical button that can be "pressed" by a user.
Platform Support
| IE | Mozilla | Netscape | Opera | Chrome | Safari | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 5.0+ | 1.0+ |
|---|
Constructors
| Constructor | Action | IE | Mozilla | Netscape | Opera | Chrome | Safari | ||
|---|---|---|---|---|---|---|---|---|---|
|
Button Constructor() : Button
Creates a new instance of a Button object.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 5.0+ | 1.0+ | ||
Button() : ButtonCreates a new instance of a Button object. Returns
|
|||||||||
Properties
| Property | Action | IE | Mozilla | Netscape | Opera | Chrome | Safari |
|---|---|---|---|---|---|---|---|
|
onclick
: Function
Event handler for when the button is clicked.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 5.0+ | 1.0+ |
|
|||||||
|
Text that appears on the button.
|
No Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 5.0+ | 1.0+ |
|
|
|||||||
References
Form|HTMLElement|Input|Reset|Submit|HTMLInputElement
Availability
JavaScript 1.0|enhanced in JavaScript 1.1|W3C