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
From the course: The DOM in JavaScript, jQuery, AngularJS, and React
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
Developer tools7m 12s
-
(Locked)
What is the DOM?5m 18s
-
(Locked)
The DOM tree5m 59s
-
(Locked)
nodeType and nodeName properties7m 17s
-
(Locked)
The Node interface10m 50s
-
(Locked)
The Document object12m 8s
-
(Locked)
The Document methods10m 27s
-
(Locked)
Element objects10m 24s
-
(Locked)
Modifying text in the DOM9m 16s
-
(Locked)
Event objects11m 54s
-
(Locked)
Window object6m 56s
-
(Locked)
CSS properties and the DOM13m 50s
-
(Locked)
Traversing the DOM tree10m 18s
-
-
-
-
-
-