使用Jquery返回XML字符串的元素在Internet Explorer 9中不起作用 [英] Using Jquery to return elements of XML string doesn't work in Internet Explorer 9
问题描述
使用jQuery我使用选择器和每个函数来通过XML字符串的命名元素进行迭代。
Using jQuery I use the selector and the each function to itterate through named elements of an XML string.
例如
$("<xml><elem></elem><elem></elem></xml>").each(function()
{
alert("processing elem tag");
});
这在FF / Chrome / IE< 8中正常工作但在9中失败。据推测,IE文档中的某些内容不再允许这样做。
This works fine in FF/Chrome/IE<8 but in 9 fails. Presumably something in the IE doc no longer allows this.
推荐答案
它并不打算直接获取XML字符串,只能从AJAX响应,例如 .responseXML
,在任何情况下都不要担心此时。
It's not intended to take a string of XML directly, only from an AJAX response, e.g. .responseXML
, in any case don't worry about it at this point.
IE9有错误,它不是RTM质量,它们主要是他们的错误...我个人不会浪费时间改变(甚至调试)你的代码,直到它们更完整/稳定。 (意见)不要担心IE9的客户端...他们在安装预发布软件时签署了一个错误的体验。
IE9 has bugs, it's not RTM quality, they are mostly their bugs...I personally wouldn't waste time changing (or even debugging) your code until their's is more complete/stable. (Opinion) don't worry about the client with IE9 either...they signed on for a buggy experience when they installed pre-release software.
这篇关于使用Jquery返回XML字符串的元素在Internet Explorer 9中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!