Ajax jQuery同步回调成功

Ajax jQuery同步回调成功,第1张

Ajax jQuery同步回调成功

您需要为以下同步请求设置async:false:

function doop(){        var that = this;        var theold = $(this).siblings('.theold').html();        var thenew = $(this).siblings('.thenew').val();        $.ajax({     async: false,     url: 'doop.php',     type: 'POST',     data: 'before=' + theold + '&after=' + thenew,     success: function(resp) {  if(resp == 1) {          $(that).siblings('.theold').html(thenew);  }     }        });        // some other pre        return false;}

详情请看这里



欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/5016353.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-11-15
下一篇2022-11-15

发表评论

登录后才能评论

评论列表(0条)

    保存