AvailabilityJavaScript 1.0 Synopsisdocument.open( ) document.open(mimetype) Arguments
DescriptionThe document.open( ) method opens a stream to document so subsequent document.write( ) calls can append data to the document. The optional mimetype argument specifies the type of data to be written and tells the browser how to interpret that data. If any existing document is displayed when the open( ) method is called, it is automatically cleared by the call to open( ) or by the first call to write( ) or writeln( ). After opening a document with open( ) and writing data to it with write( ), you should complete the document by calling close( ). UsageYou usually call Document.open( ) with no argument to open an HTML document. Occasionally, a "text/plain" document is useful, for example, for a pop-up window of debugging messages. See AlsoDocument.close( ), Document.write( ); HTMLDocument.open( ) in the DOM reference section |