0
你好我有下一个函数,总是返回null作为结果,但服务调用成功分支有任何错误, 我想解决它:1.删除异步属性,2.其他使GetStore函数调用的函数应该处理该函数的结果。我如何以正确的方式做到这一点? ()jQuery ajax返回值到其他函数
谢谢。
function GetStore() {
$.ajax({
url: serviceurl + 'GetSometing',
type: 'POST',
contentType: 'application/json',
dataType: "json",
async: false,
success: function (result) {
return result;
},
error: function (xhr, description, error) {
return null;
}
});
}