Tryit Editor v1.8

Source Code:
<!DOCTYPE html> <html> <head> <script> function openWin() { var myWindow = window.open("","MsgWindow","width=200,height=100"); myWindow.document.write("<p>This window's name is: " + myWindow.name + "</p>"); } </script> </head> <body> <p>Click the button to return the name of the new window.</p> <button onclick="openWin()">Open "myWindow"</button> </body> </html>
Result:
W3Schools.com - Try it yourself