为什么2-7编程练习中prompt中的网址修改后,没有起作用
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>close()</title> <script type="text/javascript"> function Wopen(){ var str = window.confirm("确定"); var mywin="http://www.imooc.com"; if(str){ var mywin; window.prompt("输入你要打开的网址",mywin); window.open(mywin); } } </script> </head> <body> <form> <input name="button" type="button" value="新窗口打开" onclick="Wopen()"/> </form> </body> </html>