I have a parent div with some nested elements in it. They have the same class name without an id.
How can I get the value of a specific child node?
Advertisement
Answer
add id to your parent element, then
JavaScript
x
3
1
let parent = document.getElementById('parentid');
2
let chil = parent.children;
3