为什么我打不开,我点击按钮打不开啊,没有任何反应
<!DOCTYPE html>
<html>
<head>
<title> new document </title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk"/>
<script type="text/javascript">
function open window(){
var a=confirm("是否打开该网站?");
if(a=true){
var u=prompt(" http://www.imooc.com/");
if(u!=null)
{ window open('u','width=400','height=500','menubar=no','toolbar=no')
}
}
else{
return null;
}
}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
</body>
</html>