I have an XHTML page where each HTML element has a unique custom attribute, like this:
<div class=logo tokenid=14></div>
I need a way to find this element by ID, similar to document.getElementById()
, but instead of using a general ID, I want to search for the element using my custom tokenid
attribute. Something like this:
document.getElementByTokenId('14');
Is that possible? If yes - any hint would be greatly appreciated.
Thanks.