轉載自:http://blog.csdn.net/huwenhu2007/article/details/17954119
1.<meta http-equiv="X-UA-Compatible" content="IE=7" /> 通過在頁面head標簽中添加該屬性來進行設置;
2.對於頁面中引入了公共JSP頁面的需要在公共JSP頁面中也進行設置:
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<html>
<head>
<!-- 加上html標簽和meta -->
<meta http-equiv="X-UA-Compatible" content="IE=7" />
</head>
<c:set var="ctxPath" value="${pageContext.request.contextPath}" />
<!-- 正式環境IP:10.109.81.6 測試環境IP:10.103.117.11 -->
<c:set var="cognosPath" value="http://10.103.117.11/cognos10/cgi-bin/cognos.cgi" />
</html>
<script type="text/javascript">
var path = "${ctxPath}";
var cognosPath = "${cognosPath}";
</script>
3.對於iframe或者frame加載的頁面也需要進行單獨設置:
<head>
<!-- 加上html標簽和meta -->
<meta http-equiv="X-UA-Compatible" content="IE=7" />
</head>