YouTip LogoYouTip

Met Dialog Close

# Dialog close() Method [![Image 8: Dialog Object Reference](#) Dialog Object](#) ## Example Show and close a dialog window: ```javascript var x = document.getElementById("myDialog"); function showDialog() { x.show(); } function closeDialog() { x.close(); } [Try it Β»](#) * * * ## Definition and Usage The close() method is used to close a dialog window. **Tip:** This method is often used together with the [show()](#) method. * * * ## Browser Support ![Image 9: Internet Explorer](#)![Image 10: Firefox](#)![Image 11: Opera](#)![Image 12: Google Chrome](#)![Image 13: Safari](#) **Note:** Currently, only Chrome Canary and Safari 6 support the close() method. **Note:** Even though Chrome Canary supports the `` element, you must open `chrome://flags` in the Chrome address bar and enable the "Enable experimental Web Platform features" flag. After enabling it, you need to restart the Chrome browser. * * * ## Syntax _dialogObject_.close() * * Dialog Object](#)
← Met Dialog ShowProp Dialog Open β†’