JavaScript-打开新窗口(window.open)

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

慕粉1337246356

2017-08-30 16:57

错在哪里啊?

<!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=200,top=100,left=0") 

 

  }

</script>

</head>

<body>

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

</body>

</html>


写回答 关注

1回答

  • 阿_Jessie
    2017-08-30 17:16:23
    已采纳

    第八行 

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

    留意你的引号标错了。

    阿_Jess... 回复慕粉1337...

    不客气~

    2017-08-30 17:40:41

    共 2 条回复 >

JavaScript入门篇

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

738244 学习 · 9560 问题

查看课程

相似问题