child elements javascript code example
Example 1: javascript childnodes
const children = document.getElementById('id').childNodes;
Example 2: select child javascript
Syntax
element.children
Example
Change the background color of the second child element of a <div> element:
var c = document.getElementById("myDIV").children;
c[1].style.backgroundColor = "yellow";