日期:2014-05-16  浏览次数:20308 次

Ajax引入其他jsp页面的功能代码【原创】

以前我们写jsp的时候,引入其他页面并且运行它都是用

<%@ include file="/query_test.jsp"%>这种标签的,

那么现在有另外一种方法可以用,就是Ajax,以下是用法;

?? <script type="text/javascript" src="${sessionScope._contextPath}/js/simpleAjax.js">
??? window.onload = function() {
??? callServer('${sessionScope._contextPath}/query_test.jsp', dp);?? }
?? function dp() {
?? }
?? </script>

?

就可以了~

?