我有下面这个简短的代码,但是 ajaxSuccess 没有被调用。知道为什么吗?
$.ajax({
type: "GET",
async: true,
url: "/userprofile",
data: {
'username': username
},
error: function (xhr, status, error){
}
});
$().ajaxSuccess(function(event, request, settings) {
alert("OK");
});
最佳答案
试试这个:
$.ajax({
type: "GET",
async: true,
url: "/userprofile",
data: {
'username': username
},
success:function(res){
alert(res);
},
error: function (xhr, status, error){
/////
}
});
关于javascript - ajaxSuccess未触发,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4162579/