Examveda
Examveda

The return type of getElementsByClassName() is

A. DOM

B. Document

C. Node

D. NodeList

Answer: Option D

Solution(By Examveda Team)

Like getElementsByTagName(), getElementsByClassName() can be invoked on both HTML documents and HTML elements, and it returns a live NodeList containing all matching descendants of the document or element.

Join The Discussion

Related Questions on Document Object Model and Event Handling