HTML <input type="button">
Example
A push button that activates a JavaScript function when it is clicked:
<input type="button" value="Click me" onclick="msg()">
Try it Yourself »
Definition and Usage
The <input type="button">
defines a clickable button (mostly used with a JavaScript to activate a script).
Browser Support
The numbers in the table specify the first browser version that fully supports the element.
Attribute | |||||
---|---|---|---|---|---|
type="button" | 1.0 | Yes | 1.0 | 1.0 | Yes |
Syntax
<input type="button">