Properties

Retrieves the number of immediate child nodes of the current element or a zero if the element does not contain any child nodes.
childElementCount does not return all child nodes, only child nodes that are
nodeType =1, or element nodes.

Standards information

Remarks

A valid attribute or property can be any Dynamic HTML (DHTML) property or event that applies to the object, or an
expando.

When displaying a Web page in IE8 Standards mode, Windows Internet Explorer distinguishes between attribute values specified by the original page author and the representation of those values in the DOM. For more information, see
Attribute Differences in Internet Explorer 8.

This object is available in script as of Microsoft Internet Explorer 5.

Examples

This example uses the attribute object to create a list of attributes that are
specified.