Home >Web Front-end >JS Tutorial >jQuery 'Line 4954 Error: The property or method is not supported' problem solution_jquery

jQuery 'Line 4954 Error: The property or method is not supported' problem solution_jquery

WBOY
WBOYOriginal
2016-05-16 18:11:341022browse

Solution (from here):

Find line 4954 in jQuery-1.4.2.js,
return new window.XMLHttpRequest();
modified to

Copy code The code is as follows:

if(!$.browser.msie) {
return new window.XMLHttpRequest() ;
} else {
return new window.ActiveXObject("Microsoft.XMLHTTP");
}

Over.

The reason is probably IE7/8 There is a little problem with the support for XMLHttpRequest. If the server does not send the charset HTTP Header correctly, it cannot be used normally. However, after the page is loaded, the charset can be determined by parsing the HTML Header, so the second loading of the web page will be normal.
Then let them use ActiveXObject.

Refer to the original English description:http://www.yiiframework.com/forum/index.php?/topic/9739-auto-complete-ajax-problems-in-ie-with-jquery -142/
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn