Write a JavaScript program to create a new window and Write some text on newly created window.
<html>
<head>
<title>Write some text on newly created window</title>
<script>
function createNewWindow()
{
var win = window.open("", "MyWindow", "width=300, height=200")
win.document.write("<h1>I am newly created window</h1>")
}
</script>
</head>
<body>
<form name="myform">
<input type="button" value="Create New Window" onclick="createNewWindow()"/>
</form>
</body>
</html>
