--- title: submit slug: Web/API/HTMLFormElement/submit_event translation_of: Web/API/HTMLFormElement/submit_event ---
submit
事件會在表單送出時觸發。
要注意的是,submit
事件只會在 form element 上觸發, button 或是 submit input 則不會觸發。(送出的是「表單」,而非「按鈕」)
Property | Type | Description |
---|---|---|
target {{readonlyInline}} |
{{domxref("EventTarget")}} | The event target (the topmost target in the DOM tree). |
type {{readonlyInline}} |
{{domxref("DOMString")}} | The type of event. |
bubbles {{readonlyInline}} |
{{jsxref("Boolean")}} | Whether the event normally bubbles or not. |
cancelable {{readonlyInline}} |
{{jsxref("Boolean")}} | Whether the event is cancellable or not. |