METHOD:  Document::close

document.close( )

This method closes an output stream previously opened with the method and forces data collected from any instances of the document.write or document.writeln methods to be displayed.

The following code demonstrates this and displays the output stream in a new window.

function newWindowTest() {
  var message1 = "Hello, world!"
  var message2 = "This is a test.""text/html", "replace")

Output: (to new window)
"Hello, world! This is a test."

Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information