没有弹窗出来,求大神看看!
<!DOCTYPE html>
<html>
<head>
<title>编程练习</title>
<script type="text/javascript">
function openWindow(){
var open=confirm("确认新建窗口打开网站吗?");
if(open==true) //新窗口打开时弹出确认框,是否打开
{var url=prompt("通过输入对话框,确定打开的窗口","http;//www.qq.com");}
if{(url!null)
{window.open(url,"_blank",'width=400px,height=500px,menubar=no,toolbar=no');}
else{alert("再见1");}
else{alert("再见2");}
}
</script>
</head>
<body>
<input type="button" name="button" onclick="openWindow()" value="新窗口打开网站" />
</body>
</html>
滢芷
相关分类