<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> new document </title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk"/>
<script type="text/javascript">
function openWindow(){
var sure=confirm("是否打开?");
if(sure==false){}
else
{
var sure2=prompt("请输入您要打开的网址:","http://www.baidu.com");
if(sure2!=null){
window.open(sure2,"_blank","width=400,height=500,menubar=no,toobar=no");
}
}
}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
</body>
</html>