X
HOME HTML5 CSS3 JAVASCRIPT SQL PHP5 JQUERY ANGULAR BOOTSTRAP3 XML MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

Dialog close() Method

Dialog Object Reference Dialog Object

Example

Show and close a dialog window:

var x = document.getElementById("myDialog");

function showDialog() {
    x.show();
}

function closeDialog() {
    x.close();
}

Try it yourself »


Definition and Usage

The close() method closes the dialog.

Tip: This method is often used together with the show() method.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The close() method is currently only supported in Opera 24+, Chrome 37+ and Safari 6.


Syntax

dialogObject.close()


Dialog Object Reference Dialog Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook