About 677,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. Handling "onclick" event with pure JavaScript - Stack Overflow

    Handling "onclick" event with pure JavaScript Asked 12 years, 5 months ago Modified 4 years, 11 months ago Viewed 109k times

  3. javascript - jQuery.click () vs onClick - Stack Overflow

    Sep 28, 2012 · The first method of using onclick is not jQuery but simply Javascript, so you do not get the overhead of jQuery. The jQuery way can expanded via selectors if you needed to add …

  4. How do I add a simple onClick event handler to a canvas element?

    The onclick property is the archaic method of attaching event handlers. It only allows one event to be attached with the property and the event can be lost when serialising the HTML.

  5. How to set onClick with JavaScript? - Stack Overflow

    Nov 30, 2012 · Perhaps my problem is I am trying to set onclick too soon? I am building up an entire div and appending it to the page after the page has loaded. So the page loads, the user …

  6. add onclick function to a submit button - Stack Overflow

    I need to see your submit button html tag for better help. I am not familiar with php and how it handles the postback, but I guess depending on what you want to do, you have three options: …

  7. What's the difference between event.stopPropagation and event ...

    With stopPropagation, only the button 's click handler is called while the div 's click handler never fires. Where as if you use preventDefault, only the browser's default action is stopped but the …

  8. JavaScript onMouseDown and onClick events versus event queue

    Nov 18, 2021 · From MDN Web Docs An element receives a click event when a pointing device button (such as a mouse's primary mouse button) is both pressed and released while the …

  9. Inline JavaScript onclick function - Stack Overflow

    Inline JavaScript onclick function Asked 11 years, 10 months ago Modified 2 years, 5 months ago Viewed 251k times

  10. Javascript Audio Play on click - Stack Overflow

    I have a JavaScript code to play a sound on click. It works on Chrome but on Firefox it starts on load. Can anyone help? <script> var audio = new Audio ("http://music ...