JavaScript Program for Opening Multiple Windows at a Time

Write a JavaScript program for opening multiple windows at a time.



Source Code
<html>
<head>
    <title>Opening multiple windows at a time</title>
    <script>
        function createWindows() 
        {
            for(i=0; i<5; i++) 
            {
                var mywin = window.open("", "win"+i, "width=100, height=100")
            }
        }
    </script>
</head>

<body>
<form>
    <input type="button" value="Create Windows" onclick="createWindows()"/>
</form>
</body>

</html>
Output





"Coding Hub - Learn to code" app now available on Google Play Store