weixin_33711641 2012-07-23 08:47 采纳率: 0%
浏览 32

中止所有Ajax呼叫-jqXHR

Basically im using jqXHR with asmx. I want to do this if its possible;

Overally in everypage im using 6-7 ajax calls with sync or async depends on which method it is. But when one of them got error i want to break that ajax call and after the all of ajax calls.

Thanks already!

  • 写回答

2条回答 默认 最新

  • weixin_33727510 2012-07-23 08:53
    关注

    Every time you create an ajax request it returns an object, you can use it to abort the request:

    var request = $.ajax({
        type: 'POST',
        url: url,
        success: function(data){}
    });
    

    and then use the request to abort the call:

    request.abort();
    
    评论

报告相同问题?

悬赏问题

  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用
  • ¥15 Web.config连不上数据库
  • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。
  • ¥15 怎么配置广告联盟瀑布流
  • ¥15 Rstudio 保存代码闪退
  • ¥20 win系统的PYQT程序生成的数据如何放入云服务器阿里云window版?
  • ¥50 invest生境质量模块