Document: close() method


目录

The Document.close() method finishes writing to a document, opened with Document.open().

Syntax

close()

Parameters

None.

Return value

None (undefined).

Examples

// 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

Browser compatibility


版本号 #3
由 壳壳虫 创建于 2026-10-31 03:27:53 UTC
由 cocobook-sync 更新于 2026-11-04 17:33:38 UTC