Button
suggest change<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. For a <button> element this is the default if the attribute is not specified, or if the attribute is dynamically changed to an empty or invalid value. An <input> defaults to type="text", not submit.
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 : Obsolete. It was meant to open a popup menu defined by a <menu> element. Do not use it.
[value]
The initial value of the button.
Extra Attributes for Submit Buttons
Attribute | Description
|———————|———–– | form | Specifies the ID of the form the button belongs to.If none is specified, it will belong to its ancestor form element (if one exists). | formaction | Specifies where to send the form-data when the form is submitted using this button. | formenctype | Specifies how the form-data should be encoded when submitting it to the server using this button.Can only be used with formmethod="post". | formmethod | Specifies the HTTP method to use (POST or GET) when sending form-data using this button. | formnovalidate | Specifies that the form-data should not be validated on submission. | formtarget | Specifies where to display the response that is received after submitting the form using this button.