Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript child element selector

// given html
    <div class="parent">
        <div class="child1">
            <div class="child2">
            </div>
        </div>
    </div>
    
// Get parent
let parent = document.querySelector('.parent'); 
// child element selector
parent.querySelector('.child')
 
PREVIOUS NEXT
Tagged: #javascript #child #element #selector
ADD COMMENT
Topic
Name
8+5 =