DOM and Events
DOM and Events
DOM and Events
2 Using getElementByClassName()
Step-2 Modify the Content
Modify text only: To collect text from element (and ignore any markup
inside the element) textContent property is used on the element. You can
also use this property to update the content of the element; it replaces the
entire content of it (including any markup).
E.g.