这什么反应都没有,大佬帮忙看看

来源:8-1 window对象

慕村2489475

2018-11-15 16:42

<!DOCTYPE HTML>

<html>

<head>

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

<title>window对象</title>

<script type="text/javascript">

alert("欢迎来到慕课网!");

function openWindow(){

    window.open("https://www.imooc.com/" "_block" "width=600px,height=400px")

    

}

</script>

</head>

<body>

<form>

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

</form>

</body>

</html>


写回答 关注

10回答

  • 玄众妙
    2019-05-24 11:21:25

    你缺少逗号。

  • 玄众妙
    2019-05-24 11:15:55

    <script type="text/javascript">

    function dj(){


        window.open("https://www.imooc.com","_blank","width=600px,height=400px").alert("欢迎来到慕课网");



    }


    </script>


  • 热爱生活_热爱编程
    2019-02-19 10:15:20

     window.open("https://www.imooc.com/" "_block" "width=600px,height=400px")
    括号中的分句之间缺少逗号

  • qq_慕娘3014703
    2018-12-12 10:58:23

    我觉得问题主要在参数之间都要加上","不然识别不了。_block只是name,问题不大的。第二个问题是一个语句写完了之后得写一个分号";"虽然电脑还是可以智能识别,但是为了规范还是写着好。

  • HG_long
    2018-12-08 09:46:41

    是_blank,不是_block

  • HYDMonster
    2018-11-19 15:14:00

    window.open('www.baidu.com','_blank','width=600,height=400');

  • 三好学生110
    2018-11-17 16:14:24

    是_blank,不是block

  • 慕移动0851642
    2018-11-16 01:51:55

    window.open("https://www.imooc.com/" "_block" "width=600px,height=400px")三个参数要用逗号(,)隔开,就像这样window.open("https://www.imooc.com/","_block", "width=600px,height=400px")

    qq_慕妹1...

    请问_blank这个是什么意思呢

    2018-12-23 08:53:54

    共 1 条回复 >

  • qq_慕数据13023
    2018-11-15 17:54:53

    function open(){
        window.open("","_block","width=600,height=400");
    }
    alert("欢迎来到慕课网!")

  • qq_慕数据13023
    2018-11-15 17:50:26

    _blank

JavaScript进阶篇

本课程从如何插入JS代码开始,带您进入网页动态交互世界

467382 学习 · 21877 问题

查看课程

相似问题