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