The open () method of the html DOM document Object, domdocument
The open () method can open a new document and erase the content of the current document.
Syntax:
Document. open (mimetype, replace)
Optional. Specifies the type of the document being written. The default value is "text/html ".
Replace is optional. When this parameter is set, the new document inherits historical entries from the parent document.
This method erases the content of the current HTML document and starts a new document. The new document is written using the write () method or writeln () method.
After you call the open () method to open a new document and use the write () method to set the document content, remember to close the document using the close method and force its content to be displayed.
A script or event handle that is part of a covered document cannot call this method, because the script or event handle itself will also be overwritten.
Example:
<Html> Document. open ("text/html", "replace "); Var txt = "