<html>
<title>hello</title>
<head>
<script src="../media/js/jquery-1.3.min.js" type="text/javascript"></script>
<script>
function ParseXml(xml){
var xml='<?xml version="1.0" encoding="UTF-8" ?>';
xml+='<root>';
xml+='<result><company>33</company></result>';
xml+='<result><company>222</company></result>';
xml+='</root>';
alert(xml);
$(xml).find("result").each(function()
{
var id=$(this).children("company");
alert(id.text());
});
}
</script>
</head>
<body>
<input name="Show" type="button" value="ParseXml()" onclick="ParseXml()" >
</body>
<html>
------------------------------
上面是测试代码,jquery 1.3,在chrome,ff下,可以alert(id),ie7不得行,啥原因?