最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

jQuery ajax BUG:object doesn't support this property or method

 更新時(shí)間:2010年07月06日 10:51:22   作者:  
使用$.ajax時(shí)出現(xiàn)的錯(cuò)誤,IE7下才會(huì)出錯(cuò),IE6,IE8都正常。
問題:jQuery控件的一個(gè)BUG
使用$.ajax時(shí)出現(xiàn)的錯(cuò)誤,IE7下才會(huì)出錯(cuò),IE6,IE8都正常。錯(cuò)誤提示如下圖:

官方論壇上的說明:

http://forum.jquery.com/topic/object-doesn-t-support-this-property-or-method-from-jquery-1-4-1-in-ie7-only
http://dev.jquery.com/ticket/6498
http://dev.jquery.com/ticket/6314

解決方案:
修改jquery-1.4.2.js。

論壇上有人提出的修改方式,我測(cè)試過可行。

復(fù)制代碼 代碼如下:

Hi, I found this seems to relate to jQuery bug 6314 (http://dev.jquery.com/ticket/6314). In IE7, if "Enable native XMLHTTP support" is checked (under Tools > Internet Options > Advanced tab > inside the security section) then this error shows up. Unchecking/disabiling the option seems to resolve the error.

However, since I cannot tell all website viewers to uncheck that option, then the following code also seems to resolve the issue:
In non-minified jQuery, find the lines:
try {
var oldAbort = xhr.abort;
xhr.abort = function() {
if ( xhr) {
oldAbort.call( xhr );
}

onreadystatechange( "abort" );
};
} catch(e) { }

replace it with the following code:
try {
var oldAbort = xhr.abort;
xhr.abort = function() {
if ( xhr) {
if (oldAbort.call === undefined) {
oldAbort();
} else {
oldAbort.call( xhr );
}
}

onreadystatechange( "abort" );
};
} catch(e) { }

I believe the issue is as stated by other users in this forum, that the xhr (XMLHTTP) object is a native IE object, so the abort function on the xhr.abort function does not support call.

相關(guān)文章

最新評(píng)論

陇川县| 彭山县| 淮安市| 泌阳县| 淳化县| 正镶白旗| 轮台县| 尚志市| 锡林郭勒盟| 磴口县| 乌海市| 乐都县| 礼泉县| 镇巴县| 霍邱县| 察雅县| 永福县| 靖边县| 建湖县| 南岸区| 开化县| 泗水县| 青浦区| 临沧市| 彭泽县| 顺平县| 南通市| 德阳市| 惠东县| 九龙县| 定边县| 云林县| 黄陵县| 迁西县| 五大连池市| 泰来县| 和林格尔县| 南川市| 大余县| 邢台市| 民勤县|