简单教程
提交运行
代码编辑器:
<script> var myWindow; function openWin(){ myWindow=window.open('','MsgWindow','width=200,height=100'); myWindow.document.write("<p>窗口名称为: " + myWindow.name + "</p>"); } </script> <input type="button" value="打开我的窗口" onclick="openWin()" />
运行结果: