JavaScript 参考手册
Window open() 方法
打开一个新窗口,并控制其外观
源代码:
点击运行 »
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>蜜蜂教程(mifengjc.com)</title> <script> function openWin() { window.open("https://www.mifengjc.com", "_blank", "toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, width=400, height=400"); } </script> </head> <body> <form> <input type="button" value="打开窗口" onclick="openWin()"> </form> </body> </html>
运行结果:
点击运行 »