方法一:
<script type=
"text/javascript"
src=
"../js/data.js"
></script>
方法
2
:
<%
String path = request.getContextPath();
String basePath = request.getScheme()+
"://"
+request.getServerName()+
":"
+request.getServerPort()+path+
"/"
;
%>
<script type=
"text/javascript"
src=
"<%=path%>/js/data.js"
></script> 本文转自yunlielai51CTO博客,原文链接:http://blog.51cto.com/4925054/1708314,如需转载请自行联系原作者