下面的代码演示了如何弹出一个空白窗口,然后向空白窗口内输出自定义内容
<!DOCTYPE html> <html> <head> <script> function openWin() { myWindow=window.open('','','width=200,height=100'); myWindow.document.write("<p>This is '75271.com window'</p>"); myWindow.blur(); } </script> </head> <body> <input type="button" value="Open window" onclick="openWin()" /> </body> </html>