Abort JSONP ajax request with jQuery

前端 未结 5 1143
说谎
说谎 2020-12-28 19:36

I\'m using a JSONP ajax call to load some content from a different domain, and all this stuff is executed if the user causes a \"mouseover\" on a button.

I can captu

5条回答
  •  情书的邮戳
    2020-12-28 19:57

    In jQuery 1.5 all the Ajax APIs have a wrapper object around the native XHR objects. Take a look at:

    http://api.jquery.com/jQuery.ajax/#jqXHR

     jqxhr.abort(); // should be what you're looking for
    

提交回复
热议问题