Javascript 当使用ajax获取xml时,我不能在ie6中将xml对象与jquery一起使用
我像这样使用javascript:Javascript 当使用ajax获取xml时,我不能在ie6中将xml对象与jquery一起使用,javascript,jquery,xml,internet-explorer,internet-explorer-6,Javascript,Jquery,Xml,Internet Explorer,Internet Explorer 6,我像这样使用javascript: $(document).ready(function(){ if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET","./parts.xml",fa
$(document).ready(function(){
if (window.XMLHttpRequest)
{
xmlhttp = new XMLHttpRequest();
}
else
{
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","./parts.xml",false);
xmlhttp.send();
xml=xmlhttp.responseXML;
alert(xml);
var html = $(xml).find('part#partid').html();
$('#content').html(html);
});
这似乎适用于所有其他浏览器,但在IE中,我发现:
它说innerHTML为空或不是对象,但当我使用alertxml时,它告诉我它是一个对象:
我试图让它工作,因为我的老板希望它在IE6中工作。有人对这里发生的事情和/或如何修复/解决有一些线索?xml不是errorisaon.innerHTML的内容。你为什么还要支持IE6?Windows XP甚至不再获得安全更新,甚至升级到IE8。对于一些使用Windows mobile的愚蠢手持设备-plz,我知道IE6很差劲,但我需要它来在IE6try中工作吗?