为什么我的没有打开窗口

来源:1-1 让你认识JS

慕粉3182517

2016-11-03 22:32

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>我们互动下</title>  
<script type="text/javascript">
    document.write("JS进阶");
    function login(){
        var mymessage=confrim("i love you");
        if(mymessage==true){
            window.open('http://www.imooc.com','_black','width=100%,height=300px,menubar=no,toolbar=no');
        }else{
           alert("hahha"); 
        }
        }
</script>


</head>
<body>
    <input name="button" type="button" value="login" onclick="login()"/>
</body>
</html>


写回答 关注

3回答

  • qq_underthesea_04126515
    2016-11-03 22:48:05
    已采纳

    是confirm。。。。。

    慕粉3182...

    好吧,好尴尬

    2016-11-03 22:51:39

    共 1 条回复 >

  • 诸葛亮之父
    2016-11-03 23:11:57

    confrim单词写错了,confirm

  • RobertYan3367523
    2016-11-03 22:52:44

    单词拼错了,应该是“confirm”

JavaScript进阶篇

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

467393 学习 · 21877 问题

查看课程

相似问题