IE 的弹出页面常用的有 window.open 与 window.showModalDialog。在web develop中设置相同的窗口高宽度,模式窗口在 IE6 与 IE7 下表现不一致,IE6 的模式窗口刚好与IE7 窗口的内容区域对等。
比如:window.showModalDialog('b.html',window,'dialogWidth:250px; dialogHeight:250px;'), IE6 与 IE7 下的表现如图:
分析:
其中宽度 256是设置的宽度再加上 window 的 border-width,即 250+3+3=256。而 317 的高度则是设置的高度再加上 titlebar(20px)、location(21px) 与 statusbar(20px)的高度,还要加上 border-width(3px+3px),即 250+20+21+20+3+3=317。如图所示,
参照:http://blogs.msdn.com/ie/archive/2006/08/25/719355.aspx