About 172,000 results
Open links in new tab
  1. How can I remove a JavaScript event listener? - Stack Overflow

    It looks like no one's covered the part of the current JavaScript DOM specification that gives you a mechanism to remove your event listener without using removeEventListener.

  2. How can I listen to the form submit event in javascript?

    192 I wanna write my own form validation javascript library and I've been looking on google how to detect if a submit button is clicked but all I found is code where you have to use onClick on …

  3. How to remove all event listeners of a DOM object in JavaScript?

    Remove "anonymous" event handlers of specific type The other way is to use removeEventListener() but I guess you already tried this and it didn't work. Here is the catch: …

  4. javascript - addEventListener vs onclick - Stack Overflow

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

  5. javascript - The value of "this" within the handler using ...

    Aug 27, 2009 · In render, right before attaching event listener. You can pretty much just replace addEventListener line from original example with this snippet.

  6. Event when window.location.href changes - Stack Overflow

    How can I get an event (via window.addEventListener or something similar) when window.location.href changes on a page? I also need access to the DOM of the document …

  7. How do I detect keypresses in Javascript? - Stack Overflow

    Apr 5, 2022 · One more thing: How do I remove this event listener? I tried with document.removeEventListener(), but it doesn't work: the listener continues to be active, i.e. …

  8. javascript - HTML <input type='file'> File Selection Event - Stack …

    The onchange event handler is used to handle any change in file selection event. The onchange event is triggered only when the value of an element is changed. So, when we select the same …

  9. javascript - How to check whether dynamically attached event …

    Jul 12, 2012 · Here is my problem: is it somehow possible to check for the existence of a dynamically attached event listener? Or how can I check the status of the &quot;onclick&quot; …

  10. JavaScript window resize event - Stack Overflow

    Mar 13, 2009 · Instead, create a function to add an Event Listener to the object or element. This checks and incase the listeners don't work, then it overrides the object's function as a last …