<input type="button">

Browser
  • IE
  • Cr
  • Sf
  • Fx
  • O
Type

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.

Example


<p><input type="button" value="Alert Button" onclick="alert('Example')"></p>

Output