ajax jquery return没有返回值
错误写法:function editdivisionmember(division_id,users_id){
$.ajax({
type:"POST",
url:"/default/index/ajax/do/editdivisionmember",
data:"division_id="+division_id+"&users_id="+users_id,
success:function(response){
return response;
}
});
}正确写法:
function deldivisionmember(divisionmember_id){
$.ajax({
type:"POST",
async:false,
url:"/default/index/ajax/do/deldivisionmember",
data:"divisionmember_id="+divisionmember_id,
success:function(response){
res = response;
}
});
return res;
}
文档来源:51CTO技术博客https://blog.51cto.com/u_3513677/3284023
页:
[1]