Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
HTMLFormElement.submit() メソッドは、このフォーム (<form>) を送信します。
このメソッドは、フォームの送信 <button> をアクティブにするのと似ていますが、同じではありません。ただ、このメソッドを直接呼び出す場合は、
HTMLFormElement.requestSubmit() メソッドはフォームの送信ボタン (<button>) を使用にするのと同じで、これらの相違点はありません。
フォームコントロール(送信ボタンなど)に name または id が submit のものがある場合、submit メソッドがマスクされます。myForm.submit(); を呼び出そうとすると "submit is not a function" のエラーが発生します。この場合、submit が name または id が submit であるコントロールを参照しているからです。
<input> で type="submit" の属性を持つものは HTMLFormElement.submit() ではフォームと一緒に送信されませんが、本来の HTML フォームの送信で行う場合は送信されます。
なし。
なし (undefined)。
| HTML # dom-form-submit-dev |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025年4月12日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.