new ActiveXObject("Msxml2.DOMDocument"); var xmlDoc = new ActiveXObject("Msxml2.DOMDocument");IE 支持 firefox 不支持 ,为什么啊 ? 有什么解决的办法没? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 支持ie,ff,chrome,opera,safari:/* *读取xml */ var readXML=function(xmlFile) { var xmlDoc; if(window.ActiveXObject){ xmlDoc = new ActiveXObject('Microsoft.XMLDOM'); xmlDoc.async = false; xmlDoc.load(xmlFile); //return xmlDoc.documentElement.xml; } else if (document.implementation&&document.implementation.createDocument){ var xmlhttp = new XMLHttpRequest(); xmlhttp.open("GET",xmlFile,false); xmlhttp.send(null); xmlDoc = xmlhttp.responseXML; //return new XMLSerializer().serializeToString(xmlDoc); } else { return null; } return xmlDoc;} ActiveXObject本来就是IE的专利啊!!! 熟悉 js 朋友帮忙看看如何更改函数?? 帮忙解释下关于数字转16进制的代码,js转成ASP 各位大虾,利用jquery这个插件如何实现富文本编辑器 网站设计中43个你应当避免的错误 实现鼠标经过时切换图片 easyui更换主题后,刷新页面页面变小,在ie8和360兼容模式下不换? 恳请JS高手修改一段强弹窗代码,急啊!多谢了 请无提交传值? 怎么访问父窗口的控件?急,在线,100分 谁有JAVASCRIPT的手册,包含浏览器对象及方法等(内容非常全的,或分别几册) 怎样控制让图片按顺序依次显示 获取动态添加的层的内容的方法
*读取xml
*/
var readXML=function(xmlFile) {
var xmlDoc;
if(window.ActiveXObject){
xmlDoc = new ActiveXObject('Microsoft.XMLDOM');
xmlDoc.async = false;
xmlDoc.load(xmlFile);
//return xmlDoc.documentElement.xml;
} else if (document.implementation&&document.implementation.createDocument){
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET",xmlFile,false);
xmlhttp.send(null);
xmlDoc = xmlhttp.responseXML;
//return new XMLSerializer().serializeToString(xmlDoc);
} else {
return null;
}
return xmlDoc;
}