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()
is an HTML4 feature.
It has been supported in all browsers since 1997.
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | 11 |
❮ Dialog Object