The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
childElementCount property
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.
Syntax
| JavaScript | |
|---|
Property values
Type: Integer
The number of child elements.
Standards information
- Element Traversal Specification, Section 2.5
Remarks
The childElementCount property only returns immediate children of the current node. It does not count descendent children of the immediate children.
See also
- a
- abbr
- address
- area
- attribute
- b
- base
- bdo
- blockQuote
- body
- button
- caption
- cite
- code
- col
- colGroup
- comment
- dd
- del
- div
- dl
- dt
- em
- embed
- fieldSet
- form
- head
- hn
- hr
- html
- i
- iframe
- img
- input type=button
- input type=checkbox
- input type=file
- input type=image
- input type=password
- input type=radio
- input type=reset
- input type=submit
- input type=text
- ins
- kbd
- label
- legend
- li
- link
- map
- ol
- option
- p
- pre
- q
- s
- samp
- script
- select
- small
- span
- strong
- sub
- sup
- table
- tBody
- td
- textArea
- tFoot
- th
- tHead
- title
- tr
- u
- ul
- var
Build date: 11/28/2012