Closes an output stream and forces the sent data to display.
Syntax
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 myClose() { close();} </SCRIPT> <BODY > 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 > Click this button and document.close() is called. </BUTTON>
When a function fired by an event on any object calls the close method, the window.close method is implied.
<SCRIPT LANGUAGE="JScript"> function myClose() { close();} </SCRIPT> <BODY > 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.
<BUTTON > Click this button and document.close() is called. </BUTTON>
Standards Information
This method is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 .
Applies To
document
See Also
open
Experience Silverlight enabled quickstart tutorials, video training, showcases & more.
By clicking "Click to Install" you accept the Silverlight License Agreement .Silverlight updates automatically, learn more .