Document: close() メソッド
Document.close()
メソッドは、 Document.open()
で開かれた文書への書き込みを終了します。
構文
js
close()
引数
なし。
返値
なし (undefined
)。
例
js
// 書きこむ文書を開きます。
document.open();
// 文書の内容を書き込みます。
document.write("<p>たったひとつの内容。</p>");
// 文書を閉じます。
document.close();
仕様書
Specification |
---|
HTML # dom-document-close-dev |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
close |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Partial support
- Partial support
- Has more compatibility info.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.