大神们 看看哪里出问题了?
<!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 np=prompt("请输入网址","http://www.imooc.com/");
if(np==null)
{
window.open(np,"width=500,height=40,menubar=no,toolbar=no");
}
else{alert("ko");}
}
else{alert("ko");}
}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
</body>
</html