using get name attribute using document queryselector in js code example Example: queryselector document.querySelector(".example");