What\'s the best way to get an array of all elements in an html document with a specific CSS class using javascript?
No javascript frameworks like jQuery allowed her
1) Get all elements in the document (document.getElementsByTagName('*')) 2) Do a regular expression match on the element's className attribute for each element