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

Published: 28 January 2024
on channel: 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


On this page of the site you can watch the video online Stop the default browser actions - Basic JavaScript Fast (62) | preventDefault, isDefaultPrevented with a duration of hours minute second in good quality, which was uploaded by the user Begin Coding Fast 28 January 2024, share the link with friends and acquaintances, this video has already been watched 35 times on youtube and it was liked by 1 viewers. Enjoy your viewing!