jquery ajax 不进action后台
前台是一个onchange的触发事件:
function refreshCust(){
var customer = $("#se_cust").val();
if(customer == 0){
return;
}
var param="customer="+customer;
$.ajax({
type: "POST",
url: "columnManager!getProFileInfo.action",
data: param,
//dataType: "json",
contentType: "application/json;charset=utf-8",
success: function(json){
alert("success!");
},
error:function(){
alert("系统错误");
return false;
}
});
}
后台:
public void getProFileInfo() throws IOException{
HttpServletResponse response = ServletActionContext.getResponse();
proFileList = customDao.getTransource(customer);
response.setCharacterEncoding("utf-8");
response.getWriter().print(JSONObject.fromObject(proFileList));
}
其中proFileList是:
private List<Map<String,Object>> proFileList;
就是不进action,每次执行都返回“success”,如果把 getProFileInfo方法换成同一个action下的其他方法就进后台,我把getProFileInfo方法下的内容copy到别的方法下也行,总之就是不认getProFileInfo这个方法,很郁闷,请高手指教 ...