CHUAI

博客园 首页 新随笔 联系 订阅 管理

1、方法一

(1)js

var html="";

html+="<a href=\"#\" onclick=\check('"+id+"');\">点击</a>";

function check(check_id){
    window.location.href="${contextPath}/checkPage?check_id="+check_id;
}


(2)java的controller层中

@Controller
@RequestMapping("/")
public class CheckController extends BaseController {

  //页面跳转
    @RequestMapping(value="/checkPage")
    public String turnToSendPage(HttpServletRequest request,HttpServletResponse response){
        String check_id = request.getParameter("check_id");
        request.setAttribute("check_id", check_id);
        return "要跳转的页面路径";//如:return "activiti/page/turnToSendPage";
    }

}

posted on 2017-02-24 17:14  chuai  阅读(430)  评论(0编辑  收藏  举报