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 2022年3月.
show() は HTMLDialogElement インターフェイスのメソッドで、ダイアログをモードレスに表示します。すなわち、ダイアログの外側のコンテンツも操作できる状態にします。
なし。
なし (undefined)。
ダイアログが既に開いておりモーダルである場合(つまり、すでに HTMLDialogElement.showModal() で開かれている場合)、例外が発生します。
次の例は単純なボタンで、クリックするとフォームを含むダイアログ (<dialog>) を show() メソッドで開きます。ここから、Cancel ボタンをクリックしてダイアログを閉じたり(HTMLDialogElement.close() メソッドで)、submit ボタンでフォームを送信したりすることができます。
| HTML # dom-dialog-show-dev |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025年9月20日 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.