How to count the total number of div elements that are contained in another div using javascript?
How to count the total number of div elements that are contained in another
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
getElementsByTagName()is not only adocumentmethod, but one that can run on any DOM element.see more at https://developer.mozilla.org/en/DOM/element.getElementsByTagName
So the actual code that does what you ask is