Uploaded May 2021 | Updated September 2026, 1 week ago
Learn JavaScript DOM Events Tutorial in Hindi. Learn how to use onkeypress, onclick HTML attributes to handle different javascript events. This is an alternative way to handle javascript events. Earlier we talked about addEventListener method to handle events. We can also handle common events using these HTML attributes. onclick and onkeypress are 2 common attributes that are used to handle click and keypress events in JavaScript.
You can do everything with these simple attributes - things like event.preventdefault and event.stopPropagation using this method as well. Learn how to handle events in javascript with examples. This tutorial is part #41 of the JavaScript Beginners Series. Everything is explained in Hindi. Learn all this in Hindi (हिंदी में )
Topics Covered -
1. Events using HTML Attributes - onclick
2. Simple example using onclick - create simple audio player
3. Handle preventDefault using event object
4. Simple Keypress event to allow alphabets only in the textbox
Select Different Elements using document.querySelector & document.getElementById in JavaScript -
youtube.com/watch?v=Cv5IrvcdkdM
You can follow this full playlist of JavaScript Beginners Tutorial -
youtube.com/playlist?list=PLRKyZvuMYSIPIAER03EgtGQ20CksBpFCA
For more info - visit the below link
cheezycode.com
We are social. Follow us at -
Facebook - facebook.com/cheezycode
Twitter - twitter.com/cheezycode
Instagram - instagram.com/cheezycode
Learn JavaScript DOM Events Tutorial in Hindi. Learn how to use onkeypress, onclick HTML attributes to handle different javascript events. This is an alternative way to handle javascript events. Earlier we talked about addEventListener method to handle events. We can also handle common events using these HTML attributes. onclick and onkeypress are 2 common attributes that are used to handle click and keypress events in JavaScript.
You can do everything with these simple attributes - things like event.preventdefault and event.stopPropagation using this method as well. Learn how to handle events in javascript with examples. This tutorial is part #41 of the JavaScript Beginners Series. Everything is explained in Hindi. Learn all this in Hindi (हिंदी में )
Topics Covered -
1. Events using HTML Attributes - onclick
2. Simple example using onclick - create simple audio player
3. Handle preventDefault using event object
4. Simple Keypress event to allow alphabets only in the textbox
Select Different Elements using document.querySelector & document.getElementById in JavaScript -
youtube.com/watch?v=Cv5IrvcdkdM
You can follow this full playlist of JavaScript Beginners Tutorial -
youtube.com/playlist?list=PLRKyZvuMYSIPIAER03EgtGQ20CksBpFCA
For more info - visit the below link
cheezycode.com
We are social. Follow us at -
Facebook - facebook.com/cheezycode
Twitter - twitter.com/cheezycode
Instagram - instagram.com/cheezycode









