struts-json.xml配置:
method="currentPage">
js:
$("#currpage").change(function(){
$.ajax({
type: "post",
dataType: "json",
url: "/json/tasksJson",
data: "pagingUtil.currPage=2 ,
success: function(msg){
alert(msg);
},
error:function(e, jqxhr,exception){
alert(exception);
}
});
});
action ::
public String currentPage(){
System.out.println(pagingUtil.getCurrPage());
pagingUtil.setEndPage(list.size());
return Action.SUCCESS;
}
求指导.................