我仔细检查了符号,没有错,可是点击按钮没有任何结果,求大神解惑
<!DOCTYPE html>
<html>
<head>
<title> new document </title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk"/>
<script type="text/javascript">
function openWindow()
{
var open=confirm("您要打开新的窗口吗");
if(open==true)
{var cart=prompt("请输入网址","http://www.imooc.com/");
if(cart!=null)
{window.open(cart,"_blank",'width=400px,height=500px,menubar=no,toolbar=no');}
else{alert("请输入网址");}
}
else{alert("结束");}
}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
</body>
</html>