About 11,300,000 results
Open links in new tab
  1. javascript - addEventListener vs onclick - Stack Overflow

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

  2. 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 browsers (FF, …

  3. How to pass parameter to function using in addEventListener?

    Aug 19, 2012 · In a function invoked by addEventListener the value for this will automatically be set to the object the listener is attached to, productLineSelect in this case.

  4. How to pass arguments to addEventListener listener function?

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

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

    Aug 27, 2009 · The main difference here is, inside the function, this will refer to the object passed to the addEventListener. That is, this.theTicketTable will be the object instance in the belowCode.

  6. 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: function onBodyLoad(){ document.

  7. addEventListener, "change" and option selection - Stack Overflow

    addEventListener("select", addActivityItem, false); The problem is that various events don't fire when you have one item: not "change" because, the text is no different when you select that item; not "select" …

  8. How to addEventListener to multiple elements in a single line

    Dec 4, 2016 · element1 && element2.addEventListener("input", function() { // this function does stuff }); It might not be correct grammatically, but is there a way I can give two elements the same event …

  9. Cannot read property 'addEventListener' of null - Stack Overflow

    On those pages where the function cannot find the id, I receive a "Cannot read property 'addEventListener' of null " error and none of my other functions work. Below is the code for the …

  10. Is it possible to add an eventlistener on a DIV? - Stack Overflow

    I know this function: document.addEventListener ('touchstart', function (event) { alert (event.touches.length); }, false); But is it possible to add this to a div?