当前位置: 代码迷 >> JavaScript >> 在dom中子节点有没有属性表示自己的索引号的呢解决方法
  详细解决方案

在dom中子节点有没有属性表示自己的索引号的呢解决方法

热度:142   发布时间:2012-03-29 12:53:12.0
在dom中子节点有没有属性表示自己的索引号的呢
在dom中子节点有没有属性表示自己的索引号的呢

------解决方案--------------------
karma(无为MS MVP)回复于 2001-11-29 06:01:27 得分 0
childNumber() is only available in the outdated XSL (WD), you can use position() in XSLT

in XML DOM, there is no other way to get a child node 's 序号 except iterating through its parent node 's childNodes collection and comparing nodes


复制一下,就是说DOM里是没有方法直接得到索引的,XSL里有
  相关解决方案