Answers for "get child element of parent by class"

0

get child element of parent by class

parent = document.getElementById('parent_id');
child = parent.querySelector('.className');
Posted by: Guest on April-21-2022
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

Code answers related to "get child element of parent by class"

Code answers related to "Javascript"

Browse Popular Code Answers by Language