为什么这样写,点取消也是打开网页,哪里错了?
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>window.open</title>
<script type="text/javascript">
function Wopen(){
var mymessage=confirm("是否打开慕课网");
if(mymessage==true)
{
window.open('http://www.imooc.com','_blank','height=1300,width=1200,top=100px,left=0px,menubar=yes,toolbar=yes, status=yes,scrollbars=yes')
}
else
{alert ("打开失败");
}
}
</script>
</head>
<body>
<input name="button" type="button" onClick="Wopen()" value="点击我,打开新窗口!" / >
</body>
</html>