为了账号安全,请及时绑定邮箱和手机立即绑定

去掉注释后可以弹出alert但是点击按钮后没有打开新窗口,求指点

<!DOCTYPE HTML>

<html>

<head>

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

<title>window对象</title>

<script type="text/javascript">

//alert("欢迎来到慕课网")

function open(){

    window.open("http://www.sina.com","_blank","width=600,height=400")

    }

    

</script>

</head>

<body>

<form>

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

</form>

</body>

</html>


正在回答

2 回答

open是保留字,换个函数名

0 回复 有任何疑惑可以回复我~

换个函数名,open貌似是个关键字,用个open1什么的试试就知道了。。。

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

去掉注释后可以弹出alert但是点击按钮后没有打开新窗口,求指点

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信