Back to Content

SubmitEvent: submitter property

files/en-us/web/api/submitevent/submitter/index.md

latest939 B
Original Source

{{APIRef("HTML DOM")}}

The read-only submitter property found on the {{domxref("SubmitEvent")}} interface specifies the submit button or other element that was invoked to cause the form to be submitted.

Value

An element, indicating the element that sent the {{domxref("HTMLFormElement.submit_event", "submit")}} event to the form. While this is often an {{HTMLElement("input")}} element whose type is submit or a {{HTMLElement("button")}} element whose type is submit, it could be some other element which has initiated a submission process.

If the submission was not triggered by a button of some kind, the value of submitter is null.

Examples

See SubmitEvent for example code.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}