大神们,求助我这段代码没有弹出 confirm ??
<!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.immoc.com");
if(url!=null)
{
window.open(url,"_blank","width=400,height=500,menubar=no,toolbar=no");
}
else
{
alert("再见!");
}
}
else
{
alert("再见!");
}
}
</script>
</head>
<body>
<input type="button" value="打开新网址" onclick="openwindow()">
</body>
</html>