注意該死的ie多版本的問題
function loadXML(xmlfunction ) {
var xmlDoc = null;
if (!window.DOMParser && window.ActiveXObject) {
var xmlDomVersions = ['MSXML.2.DOMDocument.6.0', 'MSXML.2.DOocument. ', 'Microsoft.XMLDOM'];
for (var i = 0; i try {
xmlDoc = new ActiveXObject(xmlDomVersions[i]);
xmlDoc = new ActiveXObject(xmlDomVersions[i]);
xmlDoc.async = false;
xmlDoc.loadXML(xmlString);
break;
} catch (e) {
}
}
}
elsese if (window DOMParser && document.implementation && document.implementation.createDocument) {
try {
domParser = new DOMParser();
xmlDoc = domParser.parse = new DOMParser();
xmlDoc = domParser.parse。 🎜>} catch (e) {
}
}
else {
return null;
}
return xmlDoc;
}
return xmlDoc; } return xmlDoc; } return xmlDoc; } return xmlDoc; } return xmlDoc; } return xmlDoc; } return xmlDoc; } >