无法弹出prompt框,求解救!!!
<!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 ahou=confirm("shi fou da kai?");
if(ahou==ture)
{
var url=prompt("通过输入对话","http://www.imooc.com");
window.open(url,"_blank",'width=400,height=500');
}
else
{
alert("shu ru zheng que wang zhi");
}
}
else{alert("da kai shi bai");}
}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
</body>
</html>