JavaScript Tutorial in Hindi for Beginners [Part 43] - Traversing elements in JavaScript

preview_player
Показать описание
#Javascript #Tutorial #Hindi

In this video i will talk about Traversing elements in JavaScript.

The previous tutorial in this series, How to Access Elements in the DOM, covers how to use the built-in methods of the document object to access HTML elements by ID, class, tag name, and query selectors. We know that the DOM is structured as a tree of nodes with the document node at the root and every other node (including elements, comments, and text nodes) as the various branches.

Often, you will want to move through the DOM without specifying each and every element beforehand. Learning how to navigate up and down the DOM tree and move from branch to branch is essential to understanding how to work with JavaScript and HTML.

With the HTML DOM, you can navigate the node tree using node relationships.

You can use the following node properties to navigate between nodes with JavaScript:

parentElement
firstElementChild
lastElementChild
children
nextElementSibling
previousElementSibling

Join this channel to support Tech Gun:
Рекомендации по теме
Комментарии
Автор

Thanks you Very Much Sir. Worth my time. You are teaching better than so called programmers having millions of views and subscribers on yt.

abhisheksahani
Автор

You deserve more subscribers in your channel. Thankyou so much sir for amazing content.

monikadubey
Автор

Thanks sir for this valuable content..You made my life simpler.

bhawnajain
Автор

Thanks brother aap k videos k ilawa mujhy or kahin s samjh h nai ata aap s m n html css bootstrap bhi sekha .
you are best teacher. Love from pakistan sindh 🙏.

abdulrasheedsamoon
Автор

si hum poorale elemet pe id nahi laga sakte hai kya jise se transverse nahi karna padega

doctorag
Автор

Sir how many parts are remains of javascript? Pls reply🙏

nadeemshaikh
Автор

It would be easy for us to search and find the topics if you keep the topic name first with id and then "JavaScript Tutorial in Hindi for Beginners" after it .

SatyaNayak-ei
Автор

why can't we keep class "intro" instead of id and do traversing? why does it outputs error doing with class?

rohanchettri
Автор

Sir yadi class name se select kar raha hu to undefined bta Raha hai why?

Ayush-
Автор

sir midlle wale ko kaise karenge change?

doctorag
Автор

how to select all same text and delete it?

shwetkumar
Автор

sir app jo code lekty hain os ko be remove na karna takee hm usy baad mai be video stop kar k daik saky Thank you

habibi_veloging
Автор

are yar aap itna sb yad kese rakh lete ho

shyamsagane