Met Dialog Close
# Dialog close() Method
[ 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

**Note:** Currently, only Chrome Canary and Safari 6 support the close() method.
**Note:** Even though Chrome Canary supports the `
YouTip