@@ -2845,7 +2845,7 @@ JavaScript enables developers to handle user interactions and browser events thr
28452845
28462846[ ^ 69 ] CodeSandbox: Event Handling.
28472847
2848- [ ^ 69 ] :[ CodeSandbox: Event Handling] ( https://rwd3qd.csb.app/ ) , last access: June 18, 2024 .
2848+ [ ^ 69 ] :[ CodeSandbox: Event Handling] ( https://rwd3qd.csb.app/ ) , last access: February 25, 2025 .
28492849
28502850- An event listener is added to the button element, listening for the 'click' event.
28512851- When the button is clicked, an alert dialog is displayed.
@@ -2857,18 +2857,18 @@ Advanced event handling techniques involve event delegation, capturing and bubbl
28572857``` javascript
28582858// Event delegation: Handling events on parent elements for dynamically created child elements
28592859document .getElementById (" parent" ).addEventListener (" click" , function (event ) {
2860- alert (" event.target.tagName is equal " + event .target .tagName );
2861- if (event .target .tagName === " BUTTON" ) {
2862- alert (" Button clicked!" );
2863- }
2860+ alert (" event.target.tagName is equal " + event .target .tagName );
2861+ if (event .target .tagName === " BUTTON" ) {
2862+ alert (" Button clicked!" );
2863+ }
28642864});
28652865```
28662866
28672867[ ![ Edit 070-Advanced Event Handling] ( images/codesandbox.svg )] ( https://codesandbox.io/p/sandbox/070-advanced-event-handling-mcrl3w )
28682868
28692869[ ^ 70 ] CodeSandbox: Advanced Event Handling.
28702870
2871- [ ^ 70 ] :[ CodeSandbox: Advanced Event Handling] ( https://mcrl3w.csb.app/ ) , last access: June 18, 2024 .
2871+ [ ^ 70 ] :[ CodeSandbox: Advanced Event Handling] ( https://mcrl3w.csb.app/ ) , last access: February 25, 2025 .
28722872
28732873### Summary: Introduction to JavaScript with HTML
28742874
0 commit comments