how to get child element by class name in javascript code example
Example 1: get child element by class javascript
var element = document.querySelector('#Element');
var elementChildren = element.querySelectorAll('.Element-child');
Example 2: javascript get child by name
let myForm = document.getElementById('form');
let child = myForm.querySelector('input[name="username"]');
console.log(child);