Get All Elements in an HTML document with a specific CSS Class

1) Get all elements in the document (document.getElementsByTagName(‘*’))
2) Do a regular expression match on the element’s className attribute for each element

Leave a Comment