在页面上动态的加载html页面,使用了jQuery的load方法火狐可以用,但是在谷歌浏览器不可以的一种解决方法,亲测有效
直奔主题
刚开始的写法
<%@page contentType=“text/html”%>
<%@page language=“java” import=“java.util.*” pageEncoding=“UTF-8”%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"?/"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<link rel="stylesheet" type="text/css" href="http://localhost:8080/TestWebJsp/css/main.css">
<title>JSP Page</title>
<script src="http://localhost:8080/Photo/js/jquery.min.js"></script>
<!-- 引入js 在另一个项目中-->
<script type="text/javascript" src="http://localhost:8080/Photo/js/M