English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML DOM close() Method

HTML DOM Document Object

close()Method used before closingdocument.open();Output stream opened by the method.

Syntax:

document.close();
document.open();
document.write("<p>The one and only content.</p>
document.close();
Test and See‹/›

Browser Compatibility

All browsers fully support the close() method:

Method
close()YesYesYesYesYes

Technical Details

Return Value:None
DOM Version:DOM 2Level

HTML DOM Document Object