关于Firefox的取元素问题
<ul id= "MenuUl ">
<li class= "ccm_a " id= "m1 "> <a href= "/ "> 首页 </a> </li>
<li class= "ccm_a " id= "m8 "> <a href= "/inc/ "> 找企业 </a> </li>
<li class= "ccm_a " id= "m2 "> <a href= "/product/ "> 找产品 </a> </li>
<li class= "ccm_a " id= "m3 "> <a href= "/info/ "> 分类信息 </a> </li>
<li class= "ccm_a " id= "m4 "> <a href= "/News/ "> 新闻资讯 </a> </li>
<li class= "ccm_a " id= "m5 "> <a href= "/expert/ "> 专家专栏 </a> </li>
<li class= "ccm_a " id= "m6 "> <a href= "/Evaluating/ "> 评测分析 </a> </li>
<li class= "ccm_a " id= "m7 "> <a href= "/solution/ "> 一站式服务 </a> </li>
</ul>
在IE中可以很用
for(i=0;i <document.getElementById( "MenuUl ").childNodes.length;i++)
{
window.alert(document.getElementById( "MenuUl ").childNodes.id);
}
这样来取得ID值,但是在firefox怎么也取不到,
请问firefox下怎么取出元素子节点个数,以及,每一个子节点的ID值,
document.getElementById( "MenuUl ").childNodes.length在IE中取得的值是8
而在Firefox是17
------解决方案--------------------参考一下这个
http://community.csdn.net/Expert/topic/5686/5686877.xml?temp=.4679834
------解决方案--------------------node是有很多nodeType的