Deprecated
Avoid using this feature in new projects.
The dynamic markup insertion API, which includes document.write(), has "very idiosyncratic behavior" which can be difficult to debug.
This feature may be a candidate for removal from web standards or browsers.
Consider using the following features instead: DOM.
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
| Spezifikation |
|---|
| HTML # dom-document-close-dev |
Browser-Kompatibilität
Help improve MDN
Ja NeinErfahren Sie, wie Sie beitragen können Diese Seite wurde automatisch aus dem Englischen übersetzt.