HTML DOM Dialog open Property Last Updated : 22 Jun, 2023 Comments Improve Suggest changes Like Article Like Report 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 accepts two values i.e. true|false which specifies whether a dialog window should be open or not. By default, it is false. true: It states that the dialog window is open.false: It states that the dialog window is not open. Example 1: This example returns the value of Dialog open property. HTML <!DOCTYPE html> <html> <body> <h3> HTML DOM Dialog open Property</h3> <dialog id="Dialog" style="color:green"> Welcome to GeeksforGeeks </dialog> <button onclick="openDialog()"> Get the value of open property </button> <p id="geeks"> </p> <script> function openDialog() { let gfg = document.getElementById("Dialog").open; document.getElementById("geeks").innerHTML = gfg; } </script> </body> </html> Output: Example 2: This example sets the value of Dialog open property. HTML <!DOCTYPE html> <html> <body> <h3> HTML DOM Dialog open Property</h3> <dialog id="Dialog" style="color:green"> Welcome to GeeksforGeeks </dialog> <button onclick="openDialog()"> Set the value of open property </button> <p id="geeks"> </p> <script> function openDialog() { let gfg = document.getElementById("Dialog").open = true; document.getElementById("geeks").innerHTML = gfg; } </script> </body> </html> Output: Supported Browsers: Google Chrome 37.0Opera 24.0Edge 79.0 and above Comment More infoAdvertise with us Next Article HTML DOM Dialog open Property M manaschhabra2 Follow Improve Article Tags : Web Technologies HTML HTML-DOM Similar Reads HTML | DOM Details open Property The Details open property in HTML DOM is used to set or return whether the hidden information is visible or not to the user. This property is used to reflect the HTML open attribute. Syntax: It returns the Details open property. detailsObject.openIt is used to set the Details open property. detailsO 2 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 show() Method 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() Metho 1 min read HTML | DOM Window opener Properties The Window opener property in HTML DOM is used to return the reference of newly created windows. This property is used to return the details of the source (parent) window. A window is opened using the window.open() method and closed using the window.opener.close() method. Syntax:window.openerReturn 2 min read HTML | DOM Window closed Property The Window closed property in HTML DOM is used to return a value that indicates whether the referred window is closed or not. Syntax: window.close() Return Value: A Boolean value, true if window is closed otherwise false. Example: HTML <!DOCTYPE html> <html> <head> <title> HT 1 min read Like