THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

Dialog show() Method

Dialog Object Reference Dialog Object

Example

Show and close a dialog window:

var x = document.getElementById("myDialog");

function showDialog() {
    x.show();
}

function closeDialog() {
    x.close();
}
Try it Yourself »

Definition and Usage

The show() method shows the dialog.

When this method is used to show a dialog window, the user is still able to interact with other elements on the page. If you do not want the user to interact with things other than the dialog, use the showModal() method.

Tip: This method is often used together with the close() method.


Browser Support

Method
show() 37.0 Not supported Not supported 6.0 24.0

Syntax

dialogObject.show()

Dialog Object Reference Dialog Object