<%@ page contentType="text/html; charset=GBK"%>
<html>
<head>
<title>test</title>
<link rel="stylesheet" type="text/css" href="css/css.css" />
<script type="text/javascript">
var myWidth = screen.availWidth;
var myHeight = screen.availHeight;
function newOpen() {
window.open('hello.jsp', '_blank', 'fullscreen=no, resizable=yes, status=no, z-look=yes, titlebar=no, scrollbars=yes, toolbar=no, menubar=no, location=no, top=0, left=0, width='+myWidth+', height='+myHeight);
window.opener = null;
window.close();
}
function closeOld() {
window.open('', '_parent', '');
window.close();
}
</script>
</head>
<script type="text/javascript">
document.write('<body οnlοad="newOpen();closeOld();"></body>');
</script>
</html>
知识点:
window.open 弹出新窗口的命令;
height=100 窗口高度;
width=400 窗口宽度;
top=0 窗口距离屏幕上方的象素值;
left=0 窗口距离屏幕左侧的象素值;
toolbar=no 是否显示工具栏,yes为显示;
menubar,scrollbars 表示菜单栏和滚动栏。
resizable=no 是否允许改变窗口大小,yes为允许;
location=no 是否显示地址栏,yes为允许;
status=no 是否显示状态栏内的信息(通常是文件已经打开),yes为允许;