1.
var oXmlFiles = new ActiveXObject( "Microsoft.XmlDom ")
在ff下怎么写?
------解决方案--------------------------------------------------------
Server.CreateObject( "Microsoft.XMLDOM ")
------解决方案--------------------------------------------------------
try:
var xmlDoc=document.implementation.createDocument( " ", " ",null);
xmlDoc.load( "1.xml ");
------解决方案--------------------------------------------------------
// cross browser
// simple demo
//
function CreateXmlDocByUrl(url, onload)
{
var xmlDoc;
try {
xmlDoc = document.implementation.CreateDocument( " ", " ", null);
if (onload) {
xmlDoc.async = true; // 异步加载
xmlDoc.onload = function () {
onload(xmlDoc);
}
} else {
xmlDoc.async = false;
}
} catch(e) {
try {
xmlDoc = new ActiveXObject( "MSXML2.DOMDocument.3.0 ");
xmlDoc.resolveExternals = true;
if(onload) {
xmlDoc.async = true;
xmlDoc.onreadystatechange = function() {
onload(xmlDoc);
}
} else {
xmlDoc.async = false;
}
}
catch (e) {
throw new Error( "not support to create a document. ");
}
}
// begin load
xmlDoc.load(url);
return xmlDoc;
}