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

为啥打不开

<!DOCTYPE html>

<html>

  <head>

    <meta charset="utf-8">

    <title>new document</title>

    <script type="text/javascript">

        function openWindow() {


          if(comfirm("是否打开网页?")){

            var url = prompt("请输入网址:","https://www.baidu.com/");

            window.open("https://www.baidu.com/",'_black','width=400,height=500','toolbar=no,menubar=no,scrollbars=yes');


        }


    </script>

  </head>

  <body>

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

  </body>

</html>


提问者:Captain72 2017-06-21 19:31

个回答