document.close() : close : Document JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Document » close »

 

document.close()










Syntax








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.












<html>
    <script>
    <!--

    document.write("This line is a long line that should wrap around the ");
    document.write("browser.  If it does not wrap around the screen then ");
    document.write("resize your browser window so that it does wrap and ");
    document.write("reexecute this code.<br>");

    document.close();

    document.write("you will notice that this paragraph was only written after ");
    document.write("the close method was called.");

    -->

    </script>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Document
» close