how to use attribute selector in dom javascript code example
Example 1: javascript select element with attribute
document.querySelectorAll('[attrname="value"]');
Example 2: query selector by href
document.querySelectorAll("[href='href_value']");