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

这段代码改了许多次就是不知道哪出错了,求正解。。。

  // 新窗口打开时弹出确认框,是否打开

 function love(){

     var damaitou=confirm("是否打开");

if(damaitou==ture)

    // 通过输入对话框,确定打开的网址,默认为 http://www.imooc.com/

 {var dalin= prompt("请您输入网址","http//www.imooc.com");

if(dalin==null)

   {alert("zai jian.");} 

    //打开的窗口要求,宽400像素,高500像素,无菜单栏、无工具栏。

else

   {window.open(dalin,'_top','width=400,height=500,menubar=no,toolbar=no');}

    }

else

{alert("结束!谢谢您的使用!");}

 } 


提问者:李升林 2015-05-16 10:02

个回答

  • 菜鸟上路了
    2015-05-16 12:02:21
    已采纳

    大兄弟,你这代码。。。damaitou==ture?damaitou==true,alert("结束!谢谢您的使用!");?这里你用了中文符号;