javascript get all elements with a specific attribute code example Example: javascript select element with attribute document.querySelectorAll('[attrname="value"]');