HTML | DOM Window closed Property Last Updated : 05 Aug, 2022 Comments Improve Suggest changes Like Article Like Report 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> HTML | DOM Window closed Property </title> <style> h1, h2 { color: green; } body { text-align: center; } </style> <script> var gfgWindow; // function to open a window. function openWindow() { gfgWindow = window.open("", "Window", "width=400, height=200"); } // function to close a window. function closeWindow() { if (gfgWindow) { gfgWindow.close(); } alert("Window Closed"); } </script> </head> <body> <h1>GeeksForGeeks</h1> <h2>HTML | DOM Window closed Property</h2> <!--Click on Open Window to open a Window--> <button onclick="openWindow()"> Open Window </button> <!--Click on Close Window to close a Window--> <button onclick="closeWindow()"> Close Window </button> </body> </html> Output: Initial: Window open: Window close: Supported Browsers: The browser supported by DOM Window closed Property are listed below: Google Chrome 1Edge 12Internet Explorer 4Firefox 1Opera 12.1Safari 1 Comment More infoAdvertise with us C ChinkitManchanda Follow Improve Article Tags : Web Technologies HTML HTML-DOM Similar Reads HTML | DOM Style zIndex Property The Style zIndex property is used for set or return the stack order of a positioned element. The element which has a lower stack order will be behind of another element with higher stack order. For example, the element with stack order(1) will be in front of the element with stack order(0). The Styl 2 min read HTML | DOM Input Password Object The Input Password Object in HTML DOM is used to represent an HTML input element with type="password". The input element with type="password" can be accessed by using getElementById() method. Syntax: It is used to access input type="password"document.getElementById("id");It is used to create type="p 3 min read HTML | DOM Column Object The Column Object in HTML DOM is used to represent the HTML <col> element. This tag is used to set or get the properties of <col> element. It can be accessed by using getElementById() method.Syntax: document.getElementById("Col_ID"); This Col_ID is assigned to HTML < col > element. 2 min read HTML | DOM Input Hidden Object The Input Hidden object in HTML DOM represents the <input> element with type = âhiddenâ attribute. The element can be accessed by using getElementById() method.Syntax: document.getElementById("id"); where id is assigned to the <input> tag.Property Values: defaultvalue: It is used to set 2 min read HTML | DOM Input Time Object The Input Time object in HTML DOM represents an <input> element with type = "time" attribute. The time attribute can be accessed by using getElementById() method. Syntax: document.getElementById("id"); where id is assigned to the <input> tag. Property Values: list: It returns the referen 3 min read HTML DOM Geolocation coordinates Property The DOM Geolocation coordinates Property in HTML is used to return the position and altitude of the device on Earth. The returned Coordinates object could be used for various purposes including navigation and tracking the position of the device. Property Values: ValuesDescriptioncoordinates.latitude 2 min read HTML DOM Textarea disabled Property The DOM Textarea disabled Property is used to set or return whether the textarea element would be disabled or not. A disabled text area is un-clickable and unusable. It is a boolean attribute and is used to reflect the HTML Disabled attribute. Syntax: It is used to return the disabled property.texta 2 min read HTML | DOM Input Week Object The Input Week object in HTML DOM represents an <input> element with type = "week" attribute. The element can be accessed by using getElementById() method. Syntax: document.getElementById("id"); where id is assigned to the <input> tag. Property Values: list: It returns the reference of d 3 min read HTML | DOM Style borderImageSource Property The DOM Style borderImageSource Property is used to set or return the image to be used instead of the styles given by the border-style property. Syntax: To get the borderImageSource propertyobject.style.borderImageSourceTo set the borderImageSource propertyobject.style.borderImageSource = "none | im 3 min read HTML | DOM Progress max Property The DOM Progress max Property is used to set or return the value of the max attribute of an <progress> element. The max attribute represents the total work is to be done for completing a task. Syntax: It is used to return the progress max property. progressObject.maxIt is used to set the progr 2 min read Like