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

哪里错了?求指点

<!DOCTYPE html>

<html>

 <head>

  <title> new document </title>  

  <meta http-equiv="Content-Type" content="text/html; charset=gbk"/>   

  <script type="text/javascript">  

    function openWindow(){

var open1=conform("新窗口打开网站");

if(open=ture)

    {var open2=prompt("请输入您要打开的网址:","http://www.baidu.com");

     if(open2=ture)

{window.open("open",_blank","width=400,height=500,menubar=no,toobar=no");

}

    }

    }

  </script> 

 </head> 

 <body> 

 <input type="button" value="新窗口打开网站" onclick="openWindow()" /> 

 </body>

</html>


提问者:逐梦凡 2015-05-18 01:27

个回答

  • _Exception
    2015-05-18 10:26:12
    已采纳

    open1==true   open2==true