Report Bug
Qus : How can you retrieve all the child elements of a specific DOM node?
Qusआप किसी विशिष्ट DOM नोड के सभी चाइल्ड तत्वों को कैसे पुनः प्राप्त कर सकते हैं?

A. element.getChildren()
B. element.childNodes
C. element.getElementsByTagName()
D. element.getChildNodes()


Solution
B. element.childNodes



Explanation
The childNodes property returns a NodeList of child elements, including text nodes, comments, and elements. If you want only element nodes, you can use children instead.



Report Bug