About 4,540,000 results
Open links in new tab
  1. JavaScript: What is addEventListener? - Stack Overflow

    Apr 23, 2010 · The addEventListener method is the W3C standard method to attach an event handler to an element, so that you can do something useful when an event is triggered. The …

  2. javascript - addEventListener vs onclick - Stack Overflow

    This Stack Overflow page discusses the differences between addEventListener and onclick in JavaScript.

  3. javascript - How to pass arguments to addEventListener listener ...

    Nov 2, 2008 · Learn how to pass arguments to addEventListener listener functions effectively in JavaScript with this guide.

  4. javascript - Correct usage of addEventListener () / attachEvent ...

    The difference being is that attachEvent can only be used on older rendering engines ( IE5+ IE5-8*) and addEventListener is a W3 standard that is implemented in the majority of other …

  5. Pure JavaScript listen to input value change - Stack Overflow

    Apr 4, 2023 · el.addEventListener('input', function () { fn(); }); But, if you want to fire event when you change inputs value manually via JavaScript you should use custom event (any name, like …

  6. AddEventListener on all created li elements - Stack Overflow

    You'll have to set the eventListener on each single item, as document.getElementsByClassName() returns a collection of items and you can't simply add …

  7. javascript - addEventListener calls the function without me even …

    second.addEventListener('click', message_me, 'shazam'); remember that in JS having () after the function name automatically calls the function and use the returned value.

  8. javascript - Difference between document.addEventListener and …

    While using PhoneGap, it has some default JavaScript code that uses document.addEventListener, but I have my own code which uses window.addEventListener: …

  9. JavaScript click event listener on class - Stack Overflow

    Aug 9, 2016 · If you use element.addEventListener ('click', event => { } to add the event to the element, the javascript will check every click internally anyway. If you add the event to all …

  10. The value of "this" within the handler using addEventListener

    Aug 27, 2009 · I've created a Javascript object via prototyping. I'm trying to render a table dynamically. While the rendering part is simple and works fine, I also need to handle certain …