e01.org

Submit button

A submit button is an element in HTML that can be used to submit a form. The native submit button elements are:

A **submit button** is an element in HTML that can be used to submit a form. The native submit button elements are:

- button (its default `type` is `"submit"`)
- `<input type="submit">`
- `<input type="image">`

In addition to submitting a form, a submit button can affect the form's behavior and what data is sent.

## Overriding the form's behavior

Submit buttons can override the form's submission behavior through various attributes:

- `formaction`: Override the [`action`](/docs/Web/HTML/Reference/Elements/form#action) attribute of the form.
- `formenctype`: Override the [`enctype`](/docs/Web/HTML/Reference/Elements/form#enctype) attribute of the form.
- `formmethod`: Override the [`method`](/docs/Web/HTML/Reference/Elements/form#method) attribute of the form.
- `formnovalidate`: Override the [`novalidate`](/docs/Web/HTML/Reference/Elements/form#novalidate) attribute of the form.
- `formtarget`: Override the [`target`](/docs/Web/HTML/Reference/Elements/form#target) attribute of the form.

## Form data entries

If the submit button is a button or `<input type="submit">` and has a `name` attribute, the form data set will include an entry for its `name` and `value`.

If the submit button is an `<input type="image">`, the form data set will include entries for the X and Y coordinates that the user clicked on (e.g., `x=100&y=200` or `buttonName.x=123&buttonName.y=234`).

## See also

- [Basic native form controls](/docs/Learn_web_development/Extensions/Forms/Basic_native_form_controls)
- [Sending form data](/docs/Learn_web_development/Extensions/Forms/Sending_and_retrieving_form_data)

source: MDN Web Docs mirror · page

Cite this

"Submit button". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Glossary/Submit_button

JSON record · API collection · citation policy