Answers for "check if element has specific child javascript"

0

check if element has specific child javascript

var hasChild = parentDiv.querySelector("#child2") != null;
//The querySelector() method lets you search the subtree beneath the 
//starting element using the given CSS selector string. If the element is found,
// its DOM node is returned.
Posted by: Guest on July-16-2021

Code answers related to "check if element has specific child javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language