- [Instructor] One of the things that you can do…with the DOM is, it allows you to find out…how many types of tags there are in the DOM.…And it's very, very useful sometimes.…So you want to find out how many paragraph tags…and if they're input tags, what type are they?…Is it a button type?…Is it a text type?…Is there a radio button type or something like that?…So those are really, really handy sometimes.…And so in this exercise, we're going to use…the getElementsByTagName.…And we want to find out how many types of tags…in this form there are of the type text only.…
The getElementsByTagName turns an array of elements…or a collection of elements…that contain the specified tag name.…If you want to, let's just say,…look up all the paragraph tags,…then that's what you will get.…So in this form here, we're going to find out…how many input fields are in this form…and then we're going to mark all of those fields…to have the type of text only.…So let's head over to brackets and do our code.…I'm using this register file,…
Author
Released
8/14/2017- What is the DOM?
- Working with properties, objects, and methods
- Traversing the DOM tree
- Manipulating elements with JavaScript
- Adding, appending, and deleting nodes with JavaScript
- Selecting content in the DOM with jQuery
- Updating the DOM tree with jQuery or AngularJS
- Making live updates for content
- Understanding React's virtual DOM approach
Skill Level Intermediate
Duration
Views
Related Courses
-
JavaScript: Enhancing the DOM
with Ray Villalobos2h 3m Intermediate -
jQuery Essential Training
with Joe Marini3h 37m Beginner
-
Introduction
-
Welcome1m
-
What you should know6m 9s
-
Using the exercise files1m 42s
-
-
1. The DOM Tree
-
Developer tools7m 12s
-
What is the DOM?5m 18s
-
The DOM tree5m 59s
-
The Node interface10m 50s
-
The Document object12m 8s
-
The Document methods10m 27s
-
Element objects10m 24s
-
Modifying text in the DOM9m 16s
-
Event objects11m 54s
-
Window object6m 56s
-
CSS properties and the DOM13m 50s
-
Traversing the DOM tree10m 18s
-
-
2. Manipulate the DOM with JavaScript
-
Updating content in place4m 16s
-
3. jQuery and the DOM
-
jQuery application structure15m 12s
-
Selecting content in the DOM10m 9s
-
-
4. AngularJS and the DOM
-
Angular application structure12m 15s
-
Updating the DOM tree10m 25s
-
From the DOM to directives11m 56s
-
-
5. The React Virtual DOM
-
React application structure10m 50s
-
Encapsulating code in components20m 43s
-
Live updates for content15m 57s
-
-
Conclusion
-
Next steps42s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Select elements with getElementsByTagName