Jack encountered a problem in csdn http://topic.csdn.net/u/20101018/15/c94fc92a-2e39-4f7d-a5ba-1052a8a53ff4.html
The Ajax method of jquery is used to request the XML file in the background. There is no problem with the request in FF, but the Ajax request fails in IE.
After reading it, I found that datatype is a limited XML file, and its XML file itself is not a problem. That is, ie load is not processed as an XML file, google found that the problem was indeed handled by IE load as text. After datatype: Text, success (the callback after the request is successful) can be performed ).
The code in this success function can be processed in this way.
VaR xmldoc; if ($. browser. MSIE) {xmldoc = new activexobject ("Microsoft. xmldom "); xmldoc. async = false; xmldoc. load (data); // data is the responsetext} else {xmldoc = document. implementation. createdocument ('','', null); xmldoc. load (data );}
It is not very convenient to do so.
As a result, after reading other advanced people's statements on the internet. Paste ANOTHER METHOD
Datatype: $. browser. MSIE? "Text": "XML" Var XML; If (typeof DATA = "string") {xml = new activexobject ("Microsoft. xmldom "); XML. async = false; XML. load (data) ;}else {xml = data ;}
So far, this problem has been solved. Although jquery has made a lot of effort on browser compatibility, it is still impossible to cover all aspects. I want
It has long been realized that jquery may not give us the ultimate compatibility. Maybe this problem can be solved soon. My personal memory is not good, so
Record hazi ~~