我有这样的代码,在装载了mouseenter XML文件,这些文件在Firefox工作:
$(document).ready(function() {
$('.invest-port-thumb a').mouseenter(function() {
$.get(this.href, function(response){
var cName = $(response).find("fragment cName");
var cind = $(response).find("fragment cName").attr("cind");
$('#slider-name .slider-copy').html(cName);
$('#slider-indu .slider-copy').html(cind);
});
});
});
,当然它不能在IE浏览器正常工作。事实上,没有任何负载。
示例XML文档:
<fragment>
<cName cind="Industrial" stat="Active">ABC Company</cName>
<hq>Chicago, IL</hq>
</fragment>
我发现了一些奇怪的事情,当我删除此行:
var cName = $(response).find("fragment cName");
尝试使用$ .ajax而不是$ .get并将dataType更改为xml – 2010-06-22 16:50:49