Home >Web Front-end >JS Tutorial >document.open() and document.write()_Basic knowledge
document.open() opens a new blank document. Under IE, open has two default parameters, which are equivalent to document.open("text/html",'""). The second parameter has only one optional value: replace, if this value is enabled, the new document will overwrite the document of the current page (equivalent to clearing all elements in the original document, and cannot go back, that is, the browser's back button is unavailable);
Look at an example :