问题
Possible Duplicate:
Override intranet compatibility mode IE8
Although I'm specifying
<meta http-equiv="X-UA-Compatible" content="IE=8" />
But due to IE's "Display intranet sites in Compatibility View" setting, my app isn't being viewed in IE8, but in compatibility mode.
Anyone know if there is a way round this???
回答1:
This will help you.
if (window.navigator.appName == "Microsoft Internet Explorer"){
// This is an IE browser. What mode is the engine in?
if (document.documentMode==8) // IE8
{
alert('IE8')
}
else
{
alert('Not IE8 or in Compatibilty mode');
}
}
according to false status (not IE8 or in Compatibilty mode) you can redirect the user to a page that says how to set his/her browser. I wonder to know if there is an automatic script to do this?
来源:https://stackoverflow.com/questions/3047154/forcing-intranet-users-to-view-webpage-in-ie8-mode-not-compatibility-mode