Dialog showModal() Method
Description
The showModal()
method shows a modal dialog.
The showModal()
method is often used together with the
close()
method.
Note
When showModal()
is used to show a dialog window, the user is not able to
interact with other elements on the page.
if you want the user to be able to interact with other elements
on the page while a dialog is shown, use the
show()
method instead.
See Also:
Syntax
dialogObject.showModal()
Browser Support
showModal()
has been supported in all browsers since HTML 4 (1997).
Chrome | IE | Edge | Firefox | Safari | Opera |
Yes | 11 | Yes | Yes | Yes | Yes |
❮ Dialog Object