Stop the default browser actions - Basic JavaScript Fast (62) | preventDefault, isDefaultPrevented

Veröffentlicht am: 28 Januar 2024
auf dem Kanal: Begin Coding Fast
35
1

The video discusses the ways to stop the default browser actions using JavaScript. There are two ways to do so. The first way is to use "return false" on the event handler placed on the HTML file. The second way is to use the preventDefault function on an event object. If the preventDefault function is applied to an event object, the isDefaultPrevented property of the event object becomes true. Bubbling effect still applies, so that once the descendant has prevented the default browser actions, the ancestors cannot do the actions that would have done initially due to bubbling.

4:22 - Use "return false" on the event handler placed on the HTML file
5:43 - Use preventDefalut() function

Playlist of my JavaScript course
   • [20 hours] JavaScript tutorial for be...  

Playlist of my HTML5 and CSS3 tutorials
   • [12 hours] HTML and CSS tutorials for...  

Playlist of my algorithm walkthrough
   • Algorithms and data structures | DSA ...  

Playlist of my Java course
   • [14 hours] Java tutorial for beginner...  

Playlist of my Java examples
   • Java projects for beginners | Java pr...  

#javascripttutorial #javascriptfullcourse #begincodingfast #javascript #preventdefault


Auf dieser Seite können Sie das Online-Video Stop the default browser actions - Basic JavaScript Fast (62) | preventDefault, isDefaultPrevented mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Begin Coding Fast 28 Januar 2024 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 35 Mal angesehen und es wurde von 1 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!