Closes an output stream and forces the sent data to display.
dhtml语法
document.close()
Return Value
No return value.
Remarks
When a function fired by an event on any object calls the
close method, the window.close method is implied.
<SCRIPT LANGUAGE="JScript">
function foo() {
close();}
</SCRIPT>
<BODY onclick="foo();">
Click this page and window.close() is called.
</BODY>
When an event on any
object calls the close method, the
document.close method is implied.
Note When
document.
write or
document.
writeln is used in an event handler,
document.
close should also be used.
<button onclick="close();">
Click this button and document.close() is called.
</BUTTON>
是否符合公共标准
This method is defined in
World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 .
Applies To
更多语法参考
open