<!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 st=confirm("你确定要打开窗口吗?");
if(st==true);
{
var sp=prompt("默认网站是","http://www.baidu.com");
if(sp==null);
{window.open(url,"_blank",'width=400px,height=500px,menubar=no,toolbar=no');}
}
else
{
alert("The end");
}
else
{
alert("The end");
}
}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
</body>
</html>