Answers for "how get childer tag by parent"

1

javascript get child element by parent id

parent = document.querySelector('.parent');
children = parent.children; // [<div class="child1">]
Posted by: Guest on August-27-2021
1

What are parent and child elements

<body>
   <div></div>
</body>

In this example, body is the parent element of div, and div 
is the child element of body.
Posted by: Guest on May-11-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language