Javascript (13) - Document Object Model - DOM [2]

3 Feb 2019 · 9 min
8:45

In this French‑language tutorial, the instructor walks through practical DOM manipulation using vanilla JavaScript. After a brief recap of accessing and styling existing elements, the lesson focuses on dynamically creating, inserting, and deleting nodes. The speaker explains the DOM tree structure, distinguishes element nodes from text nodes, and demonstrates how to use document.createElement to generate <div> elements, assign them a CSS class via .className, and attach them to a parent container with appendChild. He then shows how to create text nodes with document.createTextNode, compare this approach to innerHTML, and append the text to the newly created element. The tutorial proceeds to illustrate inserting elements before existing nodes using insertBefore together with getElementsByTagName, and how to automate the creation of multiple elements recursively with a counter variable and setTimeout. Finally, the instructor demonstrates removing a node from the DOM by targeting its parent (document.body) and calling removeChild on the identified element. Throughout, live code examples are executed in the browser to visualize each step, reinforcing the concepts of dynamic DOM updates.

Chapters

More from Yamossoun

8:56
youtube.com

Compteur synchrone - Logique séquentielle

2w ago
11:58
youtube.com

Compteur asynchrone et diviseur de fréquence - Logique séquentielle

3w ago
11:37
youtube.com

Les registres (parallèle et à décalage) - Logique séquentielle

1mo ago
6:14
youtube.com

Bascule T (Toggle) - Logique séquentielle

1mo ago
12:05
youtube.com

Bascule JK - Logique séquentielle

1mo ago
9:17
youtube.com

Bascule D flip-flop active sur front montant - Logique séquentielle

1mo ago
10:08
youtube.com

Bascule D Latch - Logique séquentielle

1mo ago
8:13
youtube.com

Bascule RS - Logique séquentielle

1mo ago
5:04
youtube.com

Logique séquentielle - Introduction

2mo ago
1:15
youtube.com

Le codeur - Logique combinatoire #codeur #logique #circuit #booleanlogic

2mo ago
1:56
youtube.com

Algorithme de calcule de la racine carrée par dichotomie #dichotomy #squareroot #algorithm

3mo ago
See all content