请看下方:html
第一步,将代码设置成html5的模式,那么用户打开项目以后,文档模式就是标准的;即不会是ie5Qurik模式;但有多是ie7标准模式;html5
第二步,浏览器
2.1 在html head中写上这句代码,便可时文档模式为你浏览器最高级别的模式;<meta http-equiv="X-UA-Compatible" content="IE=edge" />;jsp
2.2 若你想已ie8的标准模式打开,就写成<meta http-equiv=X-UA-Compatible content=”IE=EmulateIE8“>;ide
2.3 若你想要以他的文档模式ie10的打开,浏览器级别低于10的就以浏览器自己最高的方式打开,那么你要写这2句话(顺序不能错):<meta http-equiv=X-UA-Compatible content=“IE=EmulateIE10”>;<meta http-equiv="X-UA-Compatible" content="IE=edge" />;ui
缘由,优先级是第一句,但第一句执行不了,再执行第二句;htm
第3、补充两点,1.若您的代码在jsp环境中,经过iframe的形式展现的,上面代码写在common.jsp或者您的basic.jsp便可;文档
2.经我实践证实这句:<meta http-equiv=X-UA-Compatible content=”IE=10“>无效,必须写成IE=EmulateIE10;iframe
3.写多个文档模式,这样便可<meta http-equiv=”X-UA-Compatible” content=”EmulateIE8, EmulateIE10″>it