Short video: Objet event de Javascript

2 Jan 2023 · 2 min
2:00

In this French-language short tutorial, the speaker explains the JavaScript Event object, which is automatically created when an event occurs. He demonstrates how to attach an onclick handler to a div with the id "orange" and shows how to inspect the event object inside the handler. By logging `event.type`, he confirms the event is a click. He then explains `event.target`, which returns the deepest element under the mouse cursor at the moment of the event, not necessarily the element that registered the handler. Using a demo with an orange div (the one with the handler) and a yellow div (without a handler), he shows that clicking the orange div returns the orange element, while clicking the yellow div returns the yellow element even though the handler is attached to the orange div. The video emphasizes the practical difference between the element that receives the event listener and the element reported by `event.target`.

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