Javascript və HTML DOM | DOM in Javascript | Document Object Model #kody_az

Dərs haqqında

HTML DOM bir HTML sənədinin strukturlu təmsilidir. Bu model, sənədin məntiqi quruluşunu və ona necə daxil olmaq və dəyişdirmək mümkün olduğunu müəyyən edir. Veb səhifə yükləndikdə, brauzer səhifənin DOM-u yaradır və HTML-i ağac strukturuna çevirir.

DOM-un əsas Anlayışları:
1. Ağac Strukturu: DOM sənədi obyektlərin ağacı kimi təmsil edir, burada hər bir qovşaq (node) sənədin bir hissəsini təmsil edir (məsələn, elementlər, atributlar və mətnlər).
2. Qovşaqlar (Nodes):
• Element Qovşaqları: HTML elementlərini təmsil edir (məsələn, div, p, button).
• Atribut Qovşaqları: HTML elementlərinin atributlarını təmsil edir (məsələn, id, class).
• Mətn Qovşaqları: Elementin içindəki mətnləri təmsil edir.

JavaScript-in DOM-dakı кolu

JavaScript, DOM-u dinamik şəkildə manipulyasiya etməyə imkan verən skript dilidir. Onun əsas rolu veb səhifələri interaktiv və responsive etməkdir.

• HTML DOM, JavaScript-in istifadə edərək interaktivlik yaratdığı HTML sənədinin struktur çərçivəsidir.
• JavaScript, DOM ilə qarşılıqlı əlaqə yaradan mühərrikdir və proqramçılara veb səhifələri oxumaq, dəyişmək və dinamik yeniləmək imkanı verir.

==========

The HTML DOM is a structured representation of an HTML document. It defines the logical structure of a document and the way it can be accessed and manipulated. When a web page is loaded, the browser creates a DOM of the page, turning the HTML into a tree-like structure.

Key Concepts of the DOM:
1. Tree Structure: The DOM represents the document as a tree of objects, where each node is an object representing part of the document (e.g., elements, attributes, and text).
2. Nodes:
• Element Nodes: Represent HTML tags (e.g., div, p, button).
• Attribute Nodes: Represent attributes of an HTML element (e.g., id, class).
• Text Nodes: Represent the text inside an element.

JavaScript’s Role in the DOM

JavaScript is the scripting language that allows developers to manipulate the DOM dynamically. Its role is to make web pages interactive and responsive.

Dynamic Page Updates:
• JavaScript enables dynamic content updates without refreshing the page using DOM manipulation.

• The HTML DOM is the structural framework of an HTML document that JavaScript uses to create interactivity.
• JavaScript is the engine that interacts with the DOM, allowing developers to read, modify, and update web pages dynamically.

#kody_az #kodyaz #js #javascript #nodejs #es6 #viral #viralcode #nodejs #viralvideo #random #code #coder #azerbaycan #azerbaijan #baku #baki #programming #programmer #codes #hazırlıq #hazirliq #kurs #kurslar #course #courses #online #onlinecourses #test #quiz

YouTube-da bax · KODY.AZ