Lesson Code: http://www.developphp.com/view.php?tid=1208
Learn how to use the Javascript addEventListener() method for an optimal way of adding user interactivity into your HTML4 and HTML5 websites and web applications that apply Javascript.
Original source
31 responses to “Javascript tutorial addEventListener Best HTML Event Handling W3C Recommended Method”
Is it still the right way to do it in 2019?
are you still on the road?
WHAT DOES "WINDOW" STAND FOR ??
THIS VIDEO IS SOOOOO CONFUSING !!!!
The "Down-2-Earth Guru"!! Appreciate the heads up Adam!
Good Job Man You Are The Best
Love this tutorial. Simple and easy to follow. Thank you so much!
Adam, you are great, no one has bother to show old ways and new ways the way you do, thanks a million for a fully explained subject.
This video is very instructive and easy to follow. But its 2018 already, I am thinking if the methods as shown here are still the best as of now.
As someone accustomed to back end, Java Script/jQuery has always been a pain in the ass. You ALWAYS need a mock up front to demonstrate your work, and most of the time, it needs to be pretty good. Not only you need to know something you consider outside your domain (and kind of boring/trivial and non intuitive), but also something that doesn't have a standard and works on all kinds of spaghetti for four types of browsers. And now it evolves. What the fuck people, can we get standards? Any day now? For example, can we agree if left click event is 0 or 1???
what app did you use
thanks dude…ย been searching for this all day….
FREE WEBSITE TEMPLATE (FULLY RESPONSIVE):
http://themesmill.com/free-it-business-website-template/
http://themesmill.com/product/it-business-website-template/
DEMO LINK OF THE FREE WEBSITE TEMPLATE:
http://themesmill.com/demos/it-business-website-template/
thanks,, great help
too much zoom and zoom ๐
This is not the best way to do this. Given that for every "document.getElemen…." you have to add it both in the addEventListener as well as the attachEvent block. Create a function and pass the object, event and handler to it. then depending on whether the attachEvent exists, it either attach the event or adds the event listener
What text editor are you using?
But why false or true?
why window.onload = addListeners?
does this line overwrite the window.onload method?
Awesome, this will release my HTML code from some unnecessary weight ๐
what does the usecaptuer true do? exactly what is captured?
Thank you very much for this tutorial. Iam french
How can i register My personal event And fires it?
Congratulations forse yours video, i follow You, simply And Clean, perfect for My worst English ๐
Here's a Fantastic Javascript EventListener Tutorial. Thanks Adam Khoury!!
I love how we can just use the this keyword to access a object's methods and properties
Cool stuff and thanks for showing browser backward compatibility!
YELLOWTEXTTOOOBRIGHT
Heavy north east accent. thanks for showing the code
Really explains this stuff clearly.ย Nice!!!
Very useful, I am just learning so don't even know the old way but your video makes very much sense. Thank you!
Is there a simple way to do this for say hundreds of checkboxes? When the box is checked, I want the value for that checkbox to be added to a list. Ty for the video Adam.