谁帮忙看看问题出在哪里?

来源:2-5 JavaScript-打开新窗口(window.open)

大神还未崛起3386815

2016-05-21 23:18

<!DOCTYPE HTML>

<html>

<head>

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

<title>window.open</title>

<script type="text/javascript">

  function wopen(){

windoe.open('http:www.imooc.com','blank','width=600','height=400','top=100','left=o',)


  } 

</script>

</head>

<body>

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

</body>

</html>


写回答 关注

5回答

  • qq_讨厌面条的生物_03129489
    2016-05-22 16:25:55
    已采纳

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

    你window这个单词拼写错了,还有blank要加下划线,你把left的值0px写成了英文小写o了


    大神还未崛起...

    非常感谢!

    2016-05-29 14:19:07

    共 1 条回复 >

  • 太羽
    2016-05-26 16:04:40

    网址双斜杠没有了,left=0而不是o

  • 慕娘9282524
    2016-05-22 17:58:13

    <!DOCTYPE HTML>

    <html>

    <head>

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

    <title>window.open</title>

    <script type="text/javascript">

      function wopen(){

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


      } 

    </script>

    </head>

    <body>

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

    </body>

    </html>



  • 无人区修炼者
    2016-05-22 11:28:25

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

    你的函数是wopen!=Wopen

  • 慕圣4819711
    2016-05-21 23:27:45

    windoe.open('http:www.imooc.com','blank,width=600,height=400,top=100,left=o,)

JavaScript入门篇

JavaScript做为一名Web工程师的必备技术,本教程让您快速入门

738661 学习 · 9561 问题

查看课程

相似问题