JavaScript Tutorial in Hindi for Beginners [Part 38] - Document Object Model (DOM) in JavaScript

Published: 18 April 2021
on channel: Tech Gun
79,946
1.6k

#Javascript #Tutorial #Hindi

Link for Complete JavaScript Tutorial in Hindi for Beginners:    • JavaScript Tutorial in Hindi  

Link for Complete HTML and CSS Tutorial in Hindi for Beginners:    • Playlist  

In this video i will talk about Document Object Model (DOM) in JavaScript.

The Document Object Model (DOM) is the data representation of the objects that comprise the structure and content of a document on the web.

When a web page is loaded, the browser creates a Document Object Model of the page.

The HTML DOM model is constructed as a tree of Objects.

The Document Object Model (DOM) is a programming interface for HTML and XML documents. It represents the page so that programs can change the document structure, style, and content. The DOM represents the document as nodes and objects. That way, programming languages can connect to the page.

A Web page is a document. This document can be either displayed in the browser window or as the HTML source. But it is the same document in both cases. The Document Object Model (DOM) represents that same document so it can be manipulated. The DOM is an object-oriented representation of the web page, which can be modified with a scripting language such as JavaScript.


With the object model, JavaScript gets all the power it needs to create dynamic HTML:

JavaScript can change all the HTML elements in the page
JavaScript can change all the HTML attributes in the page
JavaScript can change all the CSS styles in the page
JavaScript can remove existing HTML elements and attributes
JavaScript can add new HTML elements and attributes
JavaScript can react to all existing HTML events in the page
JavaScript can create new HTML events in the page

Note: In the DOM, all HTML elements are defined as objects. so it will have both property and method

The document object represents your web page.
If you want to access any element in an HTML page, you always start with accessing the document object.



Please subscribe to watch more videos like this:    / @techgun  




Join this channel to support Tech Gun:
   / @techgun  


On this page of the site you can watch the video online JavaScript Tutorial in Hindi for Beginners [Part 38] - Document Object Model (DOM) in JavaScript with a duration of hours minute second in good quality, which was uploaded by the user Tech Gun 18 April 2021, share the link with friends and acquaintances, this video has already been watched 79,946 times on youtube and it was liked by 1.6 thousand viewers. Enjoy your viewing!