<!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 a=confirm("是否需要打开一个窗口?");
if (a==true){
var url=prompt("通过输入对话框,确定打开的网址","http://www.imooc.com");
}
if (url!=null){
window.open (url,'_blank','width=400px,height=500px,menubar=0,toolbar=0');
}
else {alert("再见!");}
else {alert("再见!");}
}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
</body>
</html>
qq_廉政_0
我会冬眠
相关分类