我现在的想法是在open3为false的时候返回的是open4也就是再次可以输入网址,但是么有作用
<!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 open2 = prompt("请输入网址:","http://www.baidu.com");
}else if(open==false)
{var open3 = confirm("确定不需要打开么?");}
if(open3 ==true)
{window.close}
}else{var open4 = prompt("请输入网址:","http://www.baidu.com");}
if(open2!=null)
{window.open(open2,"_blank","hight=500,width=400");
}else{artle("退出");}
}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
</body>
</html>