日期:2014-05-16  浏览次数:20359 次

弹出新窗口限定大小
jsp页面中点击一个链接到新页面。这个新页面我要在新窗口中打开,要规定窗口的大小。最好还有位置,还有不能最大化。页面内容居中。该怎么写?谢谢大家

------解决方案--------------------
点击一个链接到新页面?
<a href="xx.jsp" target="_newW" onclick="window.open('','_newW','width=600,height=600')">open</a>

不能最大化,只能设置width为显示器大小,窗口居中,动态计算left属性即可,页面居中使用text-align:center


------解决方案--------------------
现在一般都是使用div来做弹出的内容
------解决方案--------------------
var wnd=window.open(url,windowName,"height="+height+",width="+width+",top="+top+",left="+left+",resizable=yes,scrollbars=yes,status=no,location=no,");