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

想让各位同学帮我看看哪里出错了导致打不开

 <script type="text/javascript">  

   function openwindow(){

   var mymessage=confirm("Are you open the window?");

   if(mymessage=true)

 {window.open('http://www.imooc.com','_blank,height=400,width=500,menubar=no,toolbar=no');}

   }

  </script> 


提问者:qq_Obsessive_03831185 2016-08-17 11:53

个回答

  • 布霖
    2016-08-17 15:00:34

    if(mymessage=true)改为if(mymessage==true)。"="是赋值符,“==”是判断符

  • 慕粉3835875
    2016-08-17 12:11:02

     {window.open('http://www.imooc.com','_blank','height=400,width=500,menubar=no,toolbar=no');}