I actually can't find any documentation on document.getElements() but when I do things like:
There is no such thing as document.getElements... I'll bet your coding in Jsfiddle and don't realize that the mootools lib is included ;)
Have a look: http://jsfiddle.net/Zevan/pRKzy/
quirksmode.org is a pretty good resource for things like this (though not fully updated on IE9, as it's a moving target at the moment).
Note: they don't have an entry for
document.getElements() specifically (are you sure you're getting this name right?), but in general it's a pretty complete reference, here's an example - check out
.querySelectorAll() (which does what you describe...).
Probably you are looking for
elementList = parentNode.querySelectorAll(selectors);
This is most handy and much usable function.
To check how your requested feature is supported among browsers you can use "Can I Use" site:
On this site you can check not only functions but HTML attributes and CSS capabilities too
©2020 All rights reserved.