This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

Document.close()

Метод document.close() завершает запись в документ, открытый с помощью document.open().

Синтаксис

document.close();

Пример

// открытие документа для записи в него.
// запись содержимого документа.
// закрытие документа.
document.open();
document.write("<p>The one and only content.</p>");
document.close();

Спецификации

Specification
HTML
# dom-document-close-dev

Совместимость с браузерами