The dialog window appears, layered in front of the browser even when the user switches input focus to the window until it`s closed.
Unlike window.open(), The window.dialog() is dependent on its parent window, and even multiple dialog boxs are opened, the taskbar only show the title of their parent window. When the parent window is closed, all the depent dialog windows are closed.
you can open multiple dialog windows if you don`t specify a name for it
demoThe modal window appears, layered in front of the browser and user can`t never access its parent window until it`s closed.
For example, if modal window is opened, then you can`t not click this button