"> "> ">
<input type="button" value="Button Text">

Buttons can be used for triggering actions to occur on the page, without submitting the form. You can also use the <button> element if you require a button that can be more easily styled or contain other elements:

<button type="button">Button Text</button>

Buttons are typically used with an “onclick” event:

<input type="button" onclick="alert('hello world!')" value="Click Me">

or

<button type="button" onclick="alert('hello world!')">Click Me</button>

Attributes

[name]

The name of the button, which is submitted with the form data.

[type]

The type of the button.

Possible values are:

submit : The button submits the form data to the server. This is the default if the attribute is not specified, or if the attribute is dynamically changed to an empty or invalid value.

reset : The button resets all the controls to their initial values.

button : The button has no default behavior. It can have client-side scripts associated with the element’s events, which are triggered when the events occur.

menu : The button opens a popup menu defined via its designated element.

[value]

The initial value of the button.

Extra Attributes for Submit Buttons