引发失败时代码:

 $.ajax({
                url : 'your url',
                data:{name:value},
                cache : false, 
                async : true,
                type : "POST",
                dataType : 'json/xml/html',
                success : function (result){
                    return result;
                }
            });

解决方式:

 var ret = null;
$.ajax({
                url : 'your url',
                data:{name:value},
                cache : false, 
                async : true,
                type : "POST",
                dataType : 'json/xml/html',
                success : function (result){
                    ret=result;
                }
            });
return ret;


说明:

不要在success的回调函数中直接return。详细原因后面在考察!



相关文章:

  • 2021-11-07
  • 2021-08-30
  • 2021-12-18
  • 2021-04-10
  • 2021-09-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-01
  • 2022-02-27
  • 2021-09-10
  • 2021-07-24
  • 2021-12-04
  • 2021-08-28
相关资源
相似解决方案