how to select custom attribute in tr query selector code example Example: javascript select element with attribute document.querySelectorAll('[attrname="value"]');