29
Modifying DOM Elements
In this Chapter
Understand how JavaScript can be used to modify the DOM
Meet the HTML element
Learn how to modify attributes and text values
At this point, you kinda sorta know what the DOM is. You also saw how to find elements using querySelector
and querySelectorAll
. What’s next is for you to learn how to modify the DOM elements you found:
After all, what’s the fun in having a giant lump of clay (or cookie dough) if we can’t put our hands on it and make a giant mess? Anyway, besides it being fun and all, we will find ourselves modifying the DOM all the time. Whether we are using JavaScript to change some element’s ...
Get Javascript Absolute Beginner's Guide, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.