Javascript tutorial addEventListener Best HTML Event Handling W3C Recommended Method




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”

  1. 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???

  2. 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

  3. 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.

Leave a Reply