HTML: Markup language
CSS: Styling language
JavaScript: Scripting language
Web APIs: Programming interfaces
All web technology
Learn web development
Discover our tools
Get to know MDN better
此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。
View in English Always switch to English
Document.close() 方法用于完成对使用 Document.open() 打开的文档的写入。
Document.close()
Document.open()
close()
无。
无(undefined)。
undefined
// 打开文档并写入 document.open(); // 在文档中编写内容 document.write("<p>独一无二的内容。</p>"); // 关闭文档 document.close();
Loading…