The INPUT element defines an input field. When you specify "button" for the type attribute of this element, a general purpose push button is created.
This push button is used with JavaScript, etc.
<input type="button" value="Push Button">
| Attribute | Value | Explanation |
|---|---|---|
| type=" " | button | the type of input field |
| value=" " | button text | the text displayed on the button |
type="button"
Creates a general purpose push button.
value=""
Value is the text displayed on the button.
The style of the button can be changed with CSS. Please see the "Related Document" for details on CSS.
<p><input type="button" value="Alert Button" onclick="alert('Example')"></p>