代码错哪了,点按钮打不开

来源:8-1 window对象

非要用中英文数字以及下划线真麻烦

2017-11-19 14:05


<!DOCTYPE H

<!DOCTYPE HTML>

<html>

<head>

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

<title>window对象</title>

<script type="text/javascript">

    function ow(){

        var Wind=window.confirm("欢迎来到慕课网");

        if(ow==true){

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

        }

        else

    }    

</script>

</head>

<body>

<form>

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

</form>

</body>

</html><!DOCTYPE HTML>

<html>

<head>

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

<title>window对象</title>

<script type="text/javascript">

    function ow(){

        var Wind=window.confirm("欢迎来到慕课网");

        if(ow==true){

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

        }

        else

    }    

</script>

</head>

<body>

<form>

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

</form>

</body>

</html><!DOCTYPE HTML>

<html>

<head>

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

<title>window对象</title>

<script type="text/javascript">

    function ow(){

        var Wind=window.confirm("欢迎来到慕课网");

        if(ow==true){

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

        }

        else

    }    

</script>

</head>

<body>

<form>

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

</form>

</body>

</html><!DOCTYPE HTML>

<html>

<head>

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

<title>window对象</title>

<script type="text/javascript">

    function ow(){

        var Wind=window.confirm("欢迎来到慕课网");

        if(ow==true){

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

        }

        else

    }    

</script>

</head>

<body>

<form>

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

</form>

</body>

</html><!DOCTYPE HTML>

<html>

<head>

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

<title>window对象</title>

<script type="text/javascript">

    function ow(){

        var Wind=window.confirm("欢迎来到慕课网");

        if(ow==true){

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

        }

        else

    }    

</script>

</head>

<body>

<form>

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

</form>

</body>

</html><!DOCTYPE HTML>

<html>

<head>

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

<title>window对象</title>

<script type="text/javascript">

    function ow(){

        var Wind=window.confirm("欢迎来到慕课网");

        if(ow==true){

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

        }

        else

    }    

</script>

</head>

<body>

<form>

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

</form>

</body>

</html><!DOCTYPE HTML>

<html>

<head>

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

<title>window对象</title>

<script type="text/javascript">

    function ow(){

        var Wind=window.confirm("欢迎来到慕课网");

        if(ow==true){

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

        }

        else

    }    

</script>

</head>

<body>

<form>

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

</form>

</body>

</html><!DOCTYPE HTML>

<html>

<head>

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

<title>window对象</title>

<script type="text/javascript">

    function ow(){

        var Wind=window.confirm("欢迎来到慕课网");

        if(ow==true){

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

        }

        else

    }    

</script>

</head>

<body>

<form>

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

</form>

</body>

</html><!DOCTYPE HTML>

<html>

<head>

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

<title>window对象</title>

<script type="text/javascript">

    function ow(){

        var Wind=window.confirm("欢迎来到慕课网");

        if(ow==true){

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

        }

        else

    }    

</script>

</head>

<body>

<form>

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

</form>

</body>

</html><!DOCTYPE HTML>

<html>

<head>

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

<title>window对象</title>

<script type="text/javascript">

    function ow(){

        var Wind=window.confirm("欢迎来到慕课网");

        if(ow==true){

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

        }

        else

    }    

</script>

</head>

<body>

<form>

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

</form>

</body>

</html><!DOCTYPE HTML>

<html>

<head>

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

<title>window对象</title>

<script type="text/javascript">

    function ow(){

        var Wind=window.confirm("欢迎来到慕课网");

        if(ow==true){

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

        }

        else

    }    

</script>

</head>

<body>

<form>

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

</form>

</body>

</html><!DOCTYPE HTML>

<html>

<head>

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

<title>window对象</title>

<script type="text/javascript">

    function ow(){

        var Wind=window.confirm("欢迎来到慕课网");

        if(ow==true){

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

        }

        else

    }    

</script>

</head>

<body>

<form>

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

</form>

</body>

</html><!DOCTYPE HTML>

<html>

<head>

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

<title>window对象</title>

<script type="text/javascript">

    function ow(){

        var Wind=window.confirm("欢迎来到慕课网");

        if(ow==true){

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

        }

        else

    }    

</script>

</head>

<body>

<form>

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

</form>

</body>

</html>

TML>

<html>

<head>

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

<title>window对象</title>

<script type="text/javascript">

    function ow(){

        var Wind=window.confirm("欢迎来到慕课网");

        if(ow==true){

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

        }

        else

    }    

</script>

</head>

<body>

<form>

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

</form>

</body>

</html>


写回答 关注

3回答

  • 这就尴尬了
    2018-04-11 10:29:34

    把判断改为Wind==ture,把else删除。

  • 玩意11
    2018-02-02 12:01:03

    <!DOCTYPE H

    <!DOCTYPE HTML>

    <html>

    <head>

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

    <title>window对象</title>

    <script type="text/javascript">

        function ow(){

            var Wind=window.confirm("欢迎来到慕课网");

            if(Wind){

                window.open('http://www.imooc.com','_blank','width=600px,height=400px');

            }

        }    

    </script>

    </head>

    <body>

    <form>

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

    </form>

    </body>

    </html>


  • zdcrown
    2017-11-19 15:27:04

    ow是函数不能用于判断

    非要用中英文...

    改成Wind了,还是没反应?

    2017-11-19 16:43:28

    共 1 条回复 >

JavaScript进阶篇

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

468061 学习 · 21891 问题

查看课程

相似问题