Button (Including Submit and Reset Buttons)
The button
, submit
, and reset
form elements.
Properties
| FF, IE 3 | Read-only: Form containing the button |
| FF, IE 3 | Name of a button. Note that |
| FF, IE 3 | Read-only: Type of button: |
| FF, IE 3 | String shown on the button |
Handlers
| FF, IE 3 | Triggered when a visitor clicks on the button |
| FF, IE 4 | Triggered when the mouse is clicked on the button |
| FF, IE 4 | Triggered when the mouse is released after clicking |
Example:
<input type = "button" value = "Click me" onClick = "this.value='Stop clicking me!';">
When the user clicks this button, the words on the button change from Click ...
Get The Book of JavaScript, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.