2016-11-04 88 views
4

如何中止jQuery 3.0中的AJAX請求?如何中止jQuery 3.0 AJAX請求?

this.r = $.ajax(); 

許諾不具有像abort方法中老年的jQuery版本

if(this.r && this.r.state() == 'pending') 
{ 
    this.r.abort(); <- error not working 
} 
+1

讓我們試試這個解決方案http://stackoverflow.com/questions/4551175/how-to-cancel-abort-jquery-ajax-request – Mardzis

+0

這並不適用於jquery 3.0。我試過了!獲取放棄方法未定義 – pokahotass

回答