close()方法关闭之前使用document.open()方法打开的输出流。
语法:
document.close()
document.open();
document.write("<p>The one and only content.</p>");
document.close();
测试看看‹/›浏览器兼容性
所有浏览器完全支持close()方法:
Method | ![]() | ![]() | ![]() | ![]() | ![]() |
close() | 是 | 是 | 是 | 是 | 是 |
技术细节
返回值: | 没有 |
---|---|
DOM版本: | DOM 2级 |
HTML DOM createElement() 方法 HTML DOM adoptNode() 方法
展开全部