最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

childNodes Collection

Internet Development Index

Retrieves a collection of HTML Elements and TextNode objects that are direct descendants of the specified object.

What's New for Microsoft® Internet Explorer 6

This collection now applies to the attribute object.

Syntax

[ oColl = ] object.childNodes
[ oObject = ] object.childNodes(iIndex)

Possible Values

oCollArray containing the children of a specified object.
oObjectReference to an individual item in the array of elements contained by the object.
iIndexRequired. Integer that specifies the zero-based index of the item to be returned.

Members Table

PropertyDescription
length Sets or retrieves the number of objects in a collection.
MethodDescription
item Retrieves an object from the childNodes or children collection.
urns Retrieves a collection of all objects to which a specified behavior is attached.

Remarks

The childNodes collection can contain HTML Elements and TextNode objects.

If you check the childNodes collection of an element created through standard HTML you will encounter TextNode objects in unexpected places, in place of line breaks, for example. Alternately, if you create an element via the Document Object Model (DOM), Internet Explorer will not create extraneous TextNode objects.

Examples

This example shows how to assign to a variable the childNodes collection of the body object.

<SCRIPT>
var aNodeList = oBody.childNodes;
</SCRIPT>
:
<BODY ID="oBody">
<SPAN ID="oSpan">A Span</SPAN>
</BODY>

This example shows how to assign to a variable the childNodes collection of a node created with the createElement method.

var oParentNode = document.createElement("DIV");
var oNode = document.createElement("B");
document.body.insertBefore(oParentNode);
oParentNode.insertBefore(oNode);
var aNodeList = oParentNode.childNodes;

Standards Information

This collection is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 Non-Microsoft link.

Applies To

A, ACRONYM, ADDRESS, APPLET, AREA, attribute, B, BASE, BASEFONT, BDO, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, COMMENT, DD, DEL, DFN, DIR, DIV, DL, document, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, HEAD, hn, HR, HTML, I, IFRAME, IMG, INS, KBD, LABEL, LEGEND, LI, LINK, LISTING, MAP, MARQUEE, MENU, nextID, OL, OPTION, P, PLAINTEXT, PRE, Q, S, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TITLE, TR, TT, U, UL, VAR, XMP

See Also

About the W3C Document Object Model
玉龙| 来宾市| 江安县| 横峰县| 宣汉县| 大港区| 德惠市| 五台县| 稷山县| 金平| 沛县| 青铜峡市| 剑川县| 芜湖县| 广元市| 象州县| 云阳县| 濉溪县| 黔东| 芷江| 宜兰市| 泾阳县| 上林县| 罗定市| 广汉市| 喀喇沁旗| 贺兰县| 加查县| 蒙城县| 陆良县| 靖宇县| 新安县| 聂拉木县| 翁牛特旗| 泰和县| 武胜县| 玛沁县| 集安市| 句容市| 昆山市| 金坛市|