我感觉这样写还是有问题!不满意,想请大佬给出建议
<!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 wahaha=confirm("是否打开世界之门?");
if(wahaha==true)
{
document.write("是");
{ var haha=confirm("打开世界之门?");
if(haha==true)
{document.write("是");
window.open('http://www.imooc.com ','_blank','width=400,height=500,top=100,left=0')
}
else
{
wahaha.close();("否");
}
}
}
else
{
wahaha.close();("否");
}
}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
</body>
</html>