The first step to solve the IE encoding problem:
dataType:($.browser.msie) ? "text" : "xml" Do this first to let IE identify whether the returned text or xml is
The second step:
function parseXml(xml) { //Second step of XML IE encoding problem
if (jQuery.browser.msie) { // Determine whether the browser is IE
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); //The xmldom object under Microsoft
xmlDoc.loadXML( xml);
xml = xmlDoc;
}
return xml;
}
Step 3:
function getText(xml)
{ var newXML=parseXml(xml);
var sp=$( "#special");
var manage=$("#manageContent");
var common=$("#common");
. . . . . Omitted
}
has been applied in the project being done, so it is recommended. .
Why does it appear to be invalidated in IE? From the above solution, we can know that it is an encoding problem of the XML file. When the conversion meeting is readable in the frontend, it does not conform to the XML object of IE, so it needs to be translated into an IE-compatible object.