O'Reilly logo

JavaScript Absolute Beginner’s Guide by Kirupa Chinnathambi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

23. 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

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 us 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 you can’t put your hands on it and make a giant mess?

Image

Anyway, besides it being fun and all, you will find yourself modifying the DOM all the time. Whether you are using JavaScript to change some element’s text, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required