www.fgks.org   »   [go: up one dir, main page]

Click to Rate and Give Feedback
Methods
 close Method
close Method

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>

Standards Information

This method is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 World Wide Web link.

Applies To

document

See Also

open
Tags What's this?: Add a tag
Community Content
 
Add Community Content
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker
DCSIMG