Document: close() Methode

We’d love to hear your thoughts on the next set of proposals for the JavaScript language. You can find a description of the proposals here.
Please take two minutes to fill out our short survey.

Die Document.close() Methode beendet das Schreiben in ein Dokument, das mit Document.open() geöffnet wurde.

Syntax

js
close()

Parameter

Keine.

Rückgabewert

Keiner (undefined).

Beispiele

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();

Spezifikationen

Specification
HTML
# dom-document-close-dev

Browser-Kompatibilität