这里哪里错了?

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

三水梅林

2019-01-02 21:12

<!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(){    var mymessage= confirm("确定要打开B站吗");
   if(mymessage==true);
                 {          
    window.open('https://www.bilibili.com' ,'_blank','height=600,width=400,top=100,left=0'); 
                      }   
   else   
       {    
              alert("打开失败!"); 
        }
     }
</script>
</head>
<body>  
<input name="button" type="button" onClick="Wopen()" value="点击我,打开新窗口!" / >
</body>
</html>


写回答 关注

5回答

  • 靓仔呦
    2019-01-03 14:50:24
    已采纳

    还有alert后面的分号好像是中文的

    三水梅林

    这么点小错误我找了半天555555555555

    2019-01-03 15:02:47

    共 1 条回复 >

  • 左右左右tt
    2019-09-29 14:52:42

    应该是网页上编写的一些功能实现不了  我在开发软件上试了一下是可以实现的

  • 龙腾灬无悔
    2019-01-04 17:22:57

    https://img4.mukewang.com/5c2f25e6000181fc05530405.jpg这两个

    weixin...

    火眼金睛

    2019-01-22 20:57:56

    共 1 条回复 >

  • showmylifeqwe11
    2019-01-04 15:11:37

     if(mymessage==true);后面分号去掉

  • 靓仔呦
    2019-01-02 22:00:47

    去掉 if 后面的分号

    三水梅林

    仍然没有弹出对话框

    2019-01-03 14:42:31

    共 1 条回复 >

JavaScript入门篇

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

738244 学习 · 9560 问题

查看课程

相似问题