<html>
<head>
<meta httpequiv="
ContentType"
content="text/html;
charset=utf8"/>
<script>
function createNewDoc() {
var newDoc=document.open("text/html","replace")
var txt="<html><body>hello </body></html>"
newDoc.write(txt)
newDoc.close()
}
</script>
</head>
<body>
<input type="button" value="submit" onClick="createNewDoc()">
</body>
</html>
<head>
<meta httpequiv="
ContentType"
content="text/html;
charset=utf8"/>
<script>
function createNewDoc() {
var newDoc=document.open("text/html","replace")
var txt="<html><body>hello </body></html>"
newDoc.write(txt)
newDoc.close()
}
</script>
</head>
<body>
<input type="button" value="submit" onClick="createNewDoc()">
</body>
</html>