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

为什么单击了按钮后没反应

单击了按钮后,并没有打开新的窗口,而是一片空白,这是为什么

<!DOCTYPE HTML>

<html>

<head>

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

<title>window对象</title>

<script type="text/javascript">

function open()

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

      window.open("http://www.baidu.com",'_blank','width=600,height=400'); }

</script>

</head>

<body>

<form>

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

</form>

</body>

</html>

正在回答

2 回答

换个函数名

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

_blank  把这个换个属性值

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

举报

0/150
提交
取消

为什么单击了按钮后没反应

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