Javascript Tutorial in Hindi - 32 DOM Method getElementById in Javascript

Опубликовано: 05 Июль 2026
на канале: infinitech
793
16

#getElementByIdJavascriptMethod
#DOMMethodgetElementById
#DOMPropertyinnerHTML
#getElementByIdFunction


In javascript, DOM has many methods to work on elements where getElementById() is a special method.


Using DOM Method getElementById() you can select any element from the page using id attribute only.


In case if you have multiple elements with same id, then the first element will be considered for rendering. Mean other elements (except first ) with the same id will be neglected.


You can use this DOM Method getElementById() by document object only.
since getElementById() its a part of DOM structure and DOM structure will be selected using document object only.



Before you watch this video, I will prefer to learn about document object first.
Please check this link:    • Javascript Tutorial in Hindi - 31 DOM intr...  


For More details about Advance javascript Trainin please check this link:
http://www.php-training.in/javascript...