提交后打开新窗口尺寸不对,但记事本存html文件就可以
<!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 i=confirm("请确认是否要离开本页面?");
if (i==true){
i=prompt("请输入您要打开的网址","http://www.imooc.com/");
if (i!=null){
i=window.open(i,"_blank","width=400,height=500,menubar=no,toolbar=no");
}
}
}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
</body>
</html>