jsp页面
function layyWsjf(layyBh) {
// 显示遮盖层
MASK.show();
$.ajax({
type : "POST",
url : layyWsjfUrl, //你的请求程序页面
data : "CBh=" + layyBh, //请求需要发送的数据处理
dataType : "JSON", //数据类型
success : function(result) {
MASK.hide();
if (result.success) { //根据返回值进行处理
jAlert('', "成功");
} else{
jAlert('', result.messages);
}
if(result.ssfjfTzs){
window.location.href = '你的跳转目标地址';
}
}
});
}
servlet层
try{
Map<String, Object> result = new HashMap<String, Object>();
result.put("success", Boolean.TRUE);
this.writeAjaxObject(response, result);
}catch(Exceptiojn e){
this.sendAjaxError(response, null, "删除失败");
}
本人菜鸟自存