javascript select element with attribute

JavaScript
document.querySelectorAll('[attrname="value"]');
Source

Also in JavaScript: