Several getElementsByClassName() prototype methods in about 140 bytes (more or less). Useful for Internet Explorer <9.0 and (few) other old web browsers that do not support HTML5. Done for 140byt.es.
All "full" versions perfectly match the W3C specification, as far as I know. They support multiple class names in every order and class names that start with or contain dashes or nonascii characters.
The short version (138 bytes) does not support searching for multiple class names and fails when the query string contains any whitespace character.
The "annotated" version is a compromise with a few restrictions (see the comment below). It supports searching for multiple class names and should work in most web browsers.
Running IE9 in 'Browser Mode: IE7' and 'Document Mode: IE7 standards' and doing this (adding the version in index-full.js) on this page:
results in 0.
Running this in Chrome 15:
Results in 23.
Should I have added it to something else than document? It works for single class names, though.
The mistake probably lies with me, but you have another test case, now :)