Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

count child elements javascript

let temp = document.getElementById('element').parentNode;
console.log(temp.children.length);
// or the following
console.log(temp.childElementCount);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #count #child #elements #javascript
ADD COMMENT
Topic
Name
1+7 =