window.showModalDialogdialogHeight/dialogWidth 似乎无法在 IE 8 中工作
我工作的公司在 IE 6 上被困了 10 年,突然宣布我们的 Intranet 应用程序将迁移到 IE 8。快速浏览了一下,我们的 IE 8 似乎一切正常,但 window.showModalDialog 似乎有一个怪癖,我想知道是否有人可以帮忙?
基本上,下面的代码是在 IE6 中执行的,并打开一个我期望的宽度/高度的窗口:
//Set options
var sOptions = 'dialogWidth:247px; dialogHeight:181px; dialogLeft:100px; dialogTop:100px; status:no; scroll:no; help:no; resizable:yes';
//Open dialog
var oValue = window.showModalDialog(sURL, null, sOptions);
但是,在 IE 8 中(或者我猜是 IE 7,因为在 Intranet 应用程序上它将被强制为“兼容模式”)对话框以更大的宽度/高度打开。
有谁知道可能是什么原因造成的?我有一个模糊的想法,可能会强制执行最小宽度/高度,但我找不到任何文档来支持这一点......
Having been marooned on IE 6 for 10 years the company I work for has suddenly announced that we're migrating to IE 8 for our intranet apps. Having taken a quick look all seems to work fine in IE 8 for ours but there seems to be a quirk with window.showModalDialog that I was wondering if anyone could help with?
Basically the code below is executed in IE6 and opens up a window of the width / height I would expect:
//Set options
var sOptions = 'dialogWidth:247px; dialogHeight:181px; dialogLeft:100px; dialogTop:100px; status:no; scroll:no; help:no; resizable:yes';
//Open dialog
var oValue = window.showModalDialog(sURL, null, sOptions);
However, in IE 8 (or I guess IE 7 given that on intranet apps it will be forced to "Compatibility Mode") the dialog is opened with a larger width / height.
Does anyone know what might be causing this? I've a vague idea there might be a minimum width / height being enforced but I can't find any documentation to back this up...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论