Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check if an HTML element has any children

if (element.hasChildNodes()) {
    // It has at least one
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #HTML #element #children
ADD COMMENT
Topic
Name
1+8 =