能打开网页,但是else的内容显示不了
<!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 talk=confirm("是否打开网页?");
if(talk==true)
{
var fz=prompt("请输入网页","http://www.imooc.com");
if(fz==null);
{
document.wirte("y");
}
else
{
window.open('http://www.imooc.com','_blank','width=400,heigh=500,menubar=no,toolbar=no')
}
}
else
{
document.wirte("不打开");
}
}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
</body>
</html>