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

Java 动态加载jsp页面 在div 刷新这么简单 就可以实现了
引用

<script type="text/javascript">
var url="<%=basePath%>/qne.do?p=pessegerCountSet";
           $.post(url,{id:count},function(h){
                document.getElementById("paserDivid").innerHTML=h;
                });
</script>

只需要这个脚本就够了,只是比较简单
引用


<td colspan="8">
<div id="paserDivid">
</td>

action里面:
public ActionForward pessegerCountSet(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		System.out.println("===");
		request.setAttribute("paserCount", Integer.parseInt(request.getParameter("id")));
		return new ActionForward("/qneBusiness/passengerInfo.jsp");
	}