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

26. Creating and Removing DOM Elements

In This Chapter

Understand how easy it is to use JavaScript to create DOM elements from nothing

Learn how to clone existing DOM elements as well as remove DOM elements you no longer want

This part may blow you away. For the following sentences, I suggest you hold on to something sturdy:

Image

Despite what my earlier chapters may have led you to believe, your DOM does not have to be made up of HTML elements that exist in markup. You have the ability to create HTML elements out of thin air and add them to your DOM using just a few lines of JavaScript. You also have the ability to move elements around, remove ...

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