打开窗口和关闭窗口为什么button按钮没反应啊!
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<script type="text/javascript">
function wopen(){
var window=prompt("http://www.imooc.com");
if(window!=null){
window.open('http://www.imooc.com','_blank',width=400px,height=500px,menubar=no,toolbar=no);
}else{
alert("结束");
}
}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="wopen()" />
</body>
</html>