이 문서는 아직 자원 봉사자들이 한국어로 번역하지 않았습니다. 참여해서 번역을 마치도록 도와 주세요!
English (US)의 문서도 읽어보세요.

The submit event fires when a <form> is submitted.

Note that the submit event fires on the <form> element itself, and not on any <button> or <input type="submit"> inside it. (Forms are submitted, not buttons.)

The submit event only fires when the user clicks a submit button (<button> or <input type="submit">) in a form. The event is not raised when calling the form.submit() method directly.

Note: Trying to submit a form that does not pass validation triggers an invalid event. In this case, the validation prevents form submission, and thus there is no submit event.

General info

Interface Event
Bubbles Yes (although specified as a simple event that doesn't bubble)
Cancelable Yes
Targets Element
Default Action Varies (send the content of the form to the server)

Properties

Property Type Description
target Read only EventTarget The event target (the topmost target in the DOM tree).
type Read only DOMString The type of event.
bubbles Read only Boolean Whether the event normally bubbles or not.
cancelable Read only Boolean Whether the event is cancellable or not.

Specification

Specification Status Comment
HTML Living Standard
The definition of 'submit' in that specification.
Working Draft No change
HTML 5.2
The definition of 'submit' in that specification.
Recommendation No change
HTML 5.1
The definition of 'submit' in that specification.
Recommendation No change
HTML5
The definition of 'submit' in that specification.
Recommendation Initial definition

See also

문서 태그 및 공헌자

최종 변경자: mdnwebdocs-bot,