$('.delete').click(function () {
var msg = "确定删除该模板?";
var id = $(this).siblings(".tempsId").val();
if (confirm(msg)==true){
$.ajax({
url: "${ctx}/storeUser/sjDelTaskTemp",
type:"post",
data:{id:id},
datatype:"json",
success: function (res) {
alert(res.info);
},
error: function(){
alert("系统出错!");
}
});
}else{
return false;
}
})
error: function(xhr){
alert("系统出错!"+xhr.responseText);//看报什么错误。。肯定是代码有问题了
}
如果你要json数据,应该dataType:"json",注意大小写