HTML DOM Dialog show() Method Last Updated : 22 Jun, 2023 Comments Improve Suggest changes Like Article Like Report The DOM Dialog show() method is used to show the dialog. The Dialog element is accessed by getElementById(). It is used in HTML5. While using this method, the user can interact with other elements on the page. Syntax: dialogObject.show() Example: This example shows the working of Dialog show() Method: HTML <!DOCTYPE html> <html> <body> <h3> HTML DOM Dialog show() Method </h3> <p> Click on the below buttons to show or close the dialog window. </p> <button onclick="showDialog()"> Show dialog box </button> <dialog id="showDialog" style="color:green"> Welcome to GeeksforGeeks </dialog> <script> let gfg = document.getElementById("showDialog"); function showDialog() { gfg.show(); } </script> </body> </html> Output: Supported Browsers: Google Chrome 37.0Opera 24.0Safari 6.0 Comment More infoAdvertise with us Next Article HTML DOM Dialog show() Method M manaschhabra2 Follow Improve Article Tags : Web Technologies HTML HTML-DOM Similar Reads HTML DOM Dialog showModal() Method The DOM Dialog showModal() method is used to show the dialog. The Dialog element is accessed by getElementById(). It is used in HTML5. While using this method, the user can't interact with other elements on the page. To make the user interact with other elements, use the show() Method. Syntax: dialo 1 min read HTML DOM Dialog close() Method The DOM Dialog close() method is used to close the dialog. The Dialog element is accessed by getElementById(). It is used in HTML5. While using this method, the user can interact with other elements on the page. It is used with the Dialog show() method. Syntax: dialogObject.close() Example: This exa 1 min read HTML DOM Window alert() Method The alert() method in HTML and JavaScript is used to display an alert box with a specified message. The alert box includes an OK button and is typically used to ensure that the user receives critical information or confirmation before proceeding.Note: Alert boxes grab your attention and make you rea 3 min read HTML DOM Dialog Object The DOM Dialog Object is used to represent the HTML <dialog> element. The Dialog element is accessed by getElementById(). It is used in HTML5. Syntax: document.getElementById("ID"); Where âidâ is the ID assigned to the âDialogâ tag. Example 1: In this example, we will use DOM Dialog Object. HT 1 min read HTML DOM Dialog open Property The DOM Dialog open Property is used to set or return whether the dialog box should be open or not. It is new in HTML5 If open, it means the user can interact with it. Syntax: It returns the open property:dialogObject.openIt sets the open property:dialogObject.open = true|false Property Values: It a 2 min read Like