Originally Posted by glenngv
Or probably just using document.querySelectorAll('button.bet') which most of the browsers support (even IE8!) and then fall back to getElementsByTagName as needed.
I dunno. I would expect querySelectorAll to be a lot slower than getElementsByTagName, since it has so much more to search. But I could easily be wrong since presumably both are coded in native code.