2025-05-23

在這之前有介紹過jquery1.4.1的jquery abort bug,見:https://www.aiwalls.com/kf/201203/124315.html ,就是說在IE7下無法執行請求的abort操作。
沒想到1.4.3版本瞭還是沒有修復!
他的註解更可惡:
1. // Override the abort handler, if we can (IE 6 doesn't allow it, but that's OK)  
2. // Opera doesn't fire onreadystatechange at all on abort  
3. try {  
4.     var oldAbort = xhr.abort;  
5.     xhr.abort = function () {  
6.         // xhr.abort in IE7 is not a native JS function  
7.         // and does not have a call property  
8.         if (xhr && oldAbort.call) {  
9.             oldAbort.call(xhr);  
10.         }  
11.  
12.         onreadystatechange("abort");  
13.     };  
14. } catch (abortError) { } 
修復方法同之前:有需要可查看:/kf/201203/124315.html

  摘自  JsLover
 

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *