Vidyalelo
JavaScript · Q50

Document Object Model And Event Handling

Programming · JavaScript · question 50

Q50

The return type of getElementsByClassName() is

A.
DOM
B.
Document
C.
Node
D.
NodeList
Answer

Answer: Option D

Solution

Answer: Option D
Solution:
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.