方法一:
代码
window.open('<%=url%>/public/logingw.jsp?appName=claritynet&uid='+userName+'&pwd='+login_form.password.value,'打开一个新窗口','height=417px,width=406px,menubar=no,toolbar =no,status =no,titlebar=no,location=no,resizable=no');
方法二:
弹出新页面,新页面则被屏蔽工具栏和地址栏,并且,窗口按规定大小显示
代码
<script>
opener=null;
window.open ("http://localhost:8080/wocao/test.jsp", "newwindow", "height=500, width=800, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=yes,left=250,top=250")
</script>
opener=null;
window.open ("http://localhost:8080/wocao/test.jsp", "newwindow", "height=500, width=800, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=yes,left=250,top=250")
</script>
方法三:
父页面按照规定的大小显示,并通过点击父页面的文字,弹出子页面,该子页面则被屏蔽工具栏和地址栏,并且窗口按规定大小显示
代码
<script language="JavaScript" type="text/JavaScript">
var windowW = 700;
var windowH = 400;
windowX = Math.ceil( (window.screen.width - windowW) / 2 );
windowY = Math.ceil( (window.screen.height - windowH) / 2 );
window.resizeTo( Math.ceil( windowW ) , Math.ceil( windowH ) );
window.moveTo( Math.ceil( windowX ) , Math.ceil( windowY ) );
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
</script>
<a target="_top" class="a" onclick="MM_openBrWindow('untitled1.html','子窗口','width=200,height=100')">添加模板</a>
var windowW = 700;
var windowH = 400;
windowX = Math.ceil( (window.screen.width - windowW) / 2 );
windowY = Math.ceil( (window.screen.height - windowH) / 2 );
window.resizeTo( Math.ceil( windowW ) , Math.ceil( windowH ) );
window.moveTo( Math.ceil( windowX ) , Math.ceil( windowY ) );
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
</script>
<a target="_top" class="a" onclick="MM_openBrWindow('untitled1.html','子窗口','width=200,height=100')">添加模板</a>