1、方法一
(1)js
var html="";
html+="<a href=\"#\" οnclick=\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";
}
}