Java 动态加载jsp页面 在div 刷新这么简单 就可以实现了
程序员文章站
2022-07-15 09:30:29
...
引用
<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"); }
上一篇: 汉语转拼音之pinyin4j