From the course: The DOM in JavaScript, jQuery, AngularJS, and React

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

The Document methods

The Document methods

- [Instructor] The most important purpose of the DOM is to allow a program language such as JavaScript or Python to change virtually every node in the DOM. And what that means is that, you can actually change the entire physical structure of the web page, or you can move things around. Things like images, you can move those to a different position, or maybe replace some text or even delete a certain element in that body tag, or something like that. So all those can be done very easily using the DOM. Imagine doing that to a physical object like a house, or something like that. Well, the neat thing about this is that it's all reversible. That means, if you make changes to it, you can also undo it. And if you move something left or right, if you don't like it, you just move it back and forth, so it's very easy. And that's what makes DOM manipulation a very powerful feature in web development today. So let's take a look at some of these important methods or functions, and see how they're…

Contents