getElementsByClassName() returns a live NodeList of all elements that contain a given CSS class name.

✔ Searches the entire document or a specific element
✔ Can match elements with multiple classes
✔ The returned list updates automatically when DOM changes (live NodeList)

Categorized in:

Javascript, JS DOM,