<html>
<body>
<p>Click the button to open an output stream, add some text, and close the output stream.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
document.open();
document.write("<h1>Hello World</h1>");
document.close();
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_doc_write5 by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 05 Jun 2019 14:03:40 GMT -->
</html>