Qusआप किसी विशिष्ट वर्ग नाम वाले सभी तत्वों तक कैसे पहुंच सकते हैं?
A. document.getElementByClassName()
B. document.getElementsByClassName()
C. document.querySelectorAll(".class")
D. Both b and c
Solution
D. Both b and cExplanation
The getElementsByClassName() method returns a collection of all elements that match a specified class name, whereas querySelectorAll(".class") returns a static NodeList of all elements matching the class.