<!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 wz=prompt("在下方输入网址,并确认!","http://www.imooc.com")
if(wz!=null)
{ window.open(wz,'_blank','width=400px,hight=500px,menubar=no,toolbar=no')
else
document.write("Byebye!")
}
else
document.write("hello")
}
}
</script>
</head>
<body>
<input type="button" value="打开网站" onclick="openWindow()" /> </body></html>