document.open() : open : Document JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Document » open »

 

document.open()











Syntax








document.open()
    document.open(mimetype)



The open() method clears the current document and opens a stream for new data to be placed in the document.

This method accepts one argument, mimetype, that specifies what type of data will be written to the document.

The argument can be one of the following standard mimetypes: text/html, text/plain, image/gif, image/jpeg, or image/x-bitmap.












<html>
    <script language="JavaScript">
    <!--
    document.open()
    document.write("Stream text to document");
    document.close()
    -->
    </script>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Document
» open