问答详情
源自:2-5 JavaScript-打开新窗口(window.open)

参数如何起作用啊

<title>window.open</title>

<script type="text/javascript">

  function Wopen(){

    window.open('http://www.imooc.com','_blank','width = 600, height = 400, top = 100px, left = 0') 

    

  } 

</script>

</head>

<body>

    <input name="button" type="button" onClick="Wopen()" value="点击我,打开新窗口!" / >

</body>

</html>




代码如上,感觉没起作用

提问者:Roner 2016-04-18 10:57

个回答

  • web_harry
    2016-04-18 22:33:35

    更改为:window.open('http://www.imooc.com','_blank','width = 600, height = 400, top = 100, left = 0')

    改了top=100px

  • one丿pieceLJ
    2016-04-18 11:18:38

          window.open('http://www.imooc.com','_blank','width=600,height=400,top=100;,left=0');


  • 蒙奇D杰
    2016-04-18 11:08:34

      window.open('http://www.imooc.com','_blank','width = 600px, height = 400px, top = 100px, left = 0px') ;