首页 技术教程 实用代码 注册破解 正则表达式 网址导航 电子书籍

Prototype实战教程:Element.Methods -> childElements(1.5.1)

childElements(element) -> [HTMLElement...] 返回元素的所有子元素,结果为一个数组,数组元素已经过 扩展。 返回的数组成员按照元素在页面中的顺序进行排列(例如:索引 0 表示最顶部的子元素)。 注意:所有 Prototype 的 DOM 扩展方法均忽略文本节点,仅返回元素节点。 样例 <div id="australopithecus"> <div id="homo-erectus"> <div id="homo-neanderthalensis"></div> <div id="homo-sapiens"></div> </div> </div> $('australopithecus').childElements(); // -> [div#homo-erectus] $('homo-erectus...
类别:网页编程 - JavaScript    查看:78    更新:2014-05-22

Prototype实战教程:Element -> childElements

childElements(element) -> [HTMLElement...] 返回元素的所有子元素,结果为一个数组,数组元素已经过扩展。 返回的数组成员按照元素在页面中的顺序进行排列(例如:索引 0 表示最顶部的子元素)。 注意:所有 Prototype 的 DOM 扩展方法均忽略文本节点,仅返回元素节点。 样例 <div id="australopithecus"> <div id="homo-erectus"> <div id="homo-neanderthalensis"></div> <div id="homo-sapiens"></div> </div> </div> $('australopithecus').childElements(); // -> [div#homo-erectus] $('homo-erectus'...
类别:网页编程 - JavaScript    查看:72    更新:2014-05-22