JavaScript Program to Create a New Window and Write Some Text on that Window

Write a JavaScript program to create a new window and Write some text on that window.



Source Code
<html>
<head>
    <title>Change content of newly created window</title>
    <script>
        function init() 
        {
            var win = window.open("", "MyWindow", "width=100, height=100")
            win.document.write("<h3>Hello World!!!</h3>")
        }
    </script>
</head>

<body onload="init()">
</body>

</html>
Output