如何在不单击按钮的情况下强制 IE8 进入兼容模式
最近,我被要求协助我的城市建设他们的网站。当我去那里时,我发现他们一直在使用 Web Expressions。当他们在程序中预览页面时,它看起来很好,但当您在任何其他浏览器中打开它时,布局都相互重叠,一切都混乱了。
他们不想重新启动任何东西,所以我唯一想做的就是强制 IE 8 将其渲染为 IE 7。
我已经研究了一段时间了,我知道 一行代码,我已经尝试过了,它甚至可以工作,但是,他们不喜欢让用户必须使用按钮的想法。有没有办法让IE8直接进入兼容模式而不需要用户点击兼容按钮?
我也知道 documentMode,可以在 javascript 中将其设置为 = 7 吗?这会改变什么吗?
I was recently asked to assist my city with their website. What i found when i went there, was they had been using Web Expressions. When they previewed the page within the program, it looked fine, when you open it in any other browser though, the layout it all over riding each other and everything is all jumbled.
They don't want to re start anything so the only thing that i am trying to do is force the IE 8 to render it as IE 7.
I've been researching for awhile now and i know about the
line of code and i've tried this, it works even, however, they don't like the idea of having their users have to use a button. Is there a way to have the IE8 go straight into compatibility mode without having the users click the compatibility button?
I also know about the documentMode, can that be set to = 7 in javascript? Would that change anything?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您还没有这样做,请尝试将其放入 HTML 标头中:
更多信息:http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx
If you've not already done so, try putting this in the header of your HTML:
More information: http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx