The Document.close()
method finishes writing to a document, opened with Document.open()
.
The Document.close()
method finishes writing to a document, opened with Document.open()
.
js
close()
None.
None (undefined
).
js
// Open a document to write to it document.open(); // Write the content of the document document.write("<p>The one and only content.</p>"); // Close the document document.close();
Specification |
---|
HTML Standard # dom-document-close-dev |
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
close |
64 | 12 | 1 | 4 | 51 | 11 | 64 | 64 | 4 | 47 | 11 | 9.0 |
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Document/close