Document: close() method - Web APIs | MDN (original) (raw)
-
- Overview / Web TechnologyWeb technology reference for developers
- HTMLStructure of content on the web
- CSSCode used to describe document style
- JavaScriptGeneral-purpose scripting language
- HTTPProtocol for transmitting web resources
- Web APIsInterfaces for building web applications
- Web ExtensionsDeveloping extensions for web browsers
- AccessibilityBuild web projects usable for all
- Web TechnologyWeb technology reference for developers
The Document.close()
method finishes writing to a document, opened with Document.open().
Syntax
Parameters
None.
Return value
Examples
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();
Specifications
Specification |
---|
HTML # dom-document-close-dev |