问答详情
源自:2-7 编程练习

帮忙看看吧,谢谢了!

  function openWindow()
    {
            var mywin=confirm("打开窗口吗?");
            if (mywin==true)
            {
                var write=prompt("请输入网址:”,“http://www.imooc.com/”);
                 if(write!==null)
                 {
                    window.open(write,'width=400,height=500,menubar=no,toolbar=no');
                }
             
               else
               {
                 document.write("打开失败");   
                }
            }
           
            else{
                document.write("打开失败");
            }
    }



有人帮我看看嘛?哪里错了?

提问者:华丽邂逅 2015-03-12 17:34

个回答

  • _Exception
    2015-03-12 17:48:23

    是 write != null