總頁面:
<script>
function replace(){
var test = $(".test").val();
$("#myiframe").attr("src","part.htm?test="+test);
</script>
<iframe id="myiframe" src=""></iframe>
後臺:
@RequestMapping({"part.htm"})//前臺請求
public ModelAndView ck(ModelMap root){
ModelAndView mv = new ModelAndView();
//操作
mv.setViewName("part");//轉向的jsp地址
return mv;
}
part.jsp:
一個完整的jsp,body裏爲替換內容