javascript get childnode style attribute code example
Example 1: javascript get 2nd child element
//you can use the css nth-child property like this:
var second-child = document.querySeletorAll('[your element name]:nth-child(2)');
Example 2: javascript get child by name
let myForm = document.getElementById('form');
let child = myForm.querySelector('input[name="username"]');
console.log(child);