那位朋友可以帮我看一下,窗口弹不出来,那里错了?
<!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 url=prompt("想要开打开的网址","http://www.baidu.com");
if(url!=null){
window.open(url,"_blank","width=400px,height=500px");
}
else{
alert("thank you!");
}
}
else{
alert("thank you!");
}
}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
</body>
</html>