August 1999
Intermediate to advanced
1488 pages
72h 53m
English
document.close()
The close() method closes the output stream to the document. Any output that has not been written prior to calling the method will be displayed.
Listing 7.94 uses the close() method to close the output stream to a document. Notice that a portion of the last paragraph is not displayed until after the close() method is called and the alert box has been displayed.
<html> <script> <!-- Hide //Write some text to the screen and then close the document. document.write("This line is a long line that should wrap around the "); document.write("browser. If it does not wrap ... |
Read now
Unlock full access