Javascript (16) - API Selectors

7 Feb 2019 · 9 min
9:27

In this French tutorial, the instructor introduces the JavaScript Selectors API, showing how to use CSS‑style selectors with the methods document.querySelector and document.querySelectorAll to target DOM elements. The lesson demonstrates selecting elements by tag, ID, and attribute selectors, explains the difference between querySelector (first match) and querySelectorAll (NodeList of all matches) and how to access a specific element via its index. It then explores a set of element properties useful for layout calculations—clientHeight, offsetHeight, offsetTop, offsetLeft, scrollHeight, scrollTop—and shows how to retrieve the viewport height via the window object. Click and scroll events are attached to log these values, illustrating practical debugging and dynamic UI techniques. The video concludes by summarizing the API’s two main methods and the breadth of CSS selectors they support.

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