Force IE8 Into IE7 Compatiblity Mode

2019-01-04 23:29发布

Is there a way to force IE8 into IE7 compatibility mode using .NET or Javascript?

9条回答
闹够了就滚
2楼-- · 2019-01-05 00:27

A note to this:

IE 8.0s emulation only promises to display the page the same. There are subtle differences that might cause functionality to break. I recently had a problem with just that. Where IE 7.0 uses a javascript wrapper-function called "anonymous()" in IE 8.0 the wrapper was named differently.

So do not expect things like JavaScript to "just work", because you turn on emulation.

查看更多
男人必须洒脱
3楼-- · 2019-01-05 00:31

I might have found it now. http://blog.lroot.com/articles/the-ie7-compatibility-tag-force-ie8-to-use-the-ie7-rendering-mode/

The site says adding this meta tag:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">

or adding this to .htaccess

Header set X-UA-Compatible: IE=EmulateIE7 
查看更多
孤傲高冷的网名
4楼-- · 2019-01-05 00:33

If you add this to your meta tags:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

IE8 will render the page like IE7.

查看更多
登录 后发表回答