Events bubble by default. So the difference between the two is:
target
is the element that triggered the event (e.g., the user clicked on)currentTarget
is the element that the event listener is attached to.
More Related Contents:
- How can I refresh a page with jQuery?
- OnChange event handler for radio button (INPUT type=”radio”) doesn’t work as one value
- How to print a number with commas as thousands separators in JavaScript
- Angular 5 Service to read local .json file
- How to get the anchor from the URL using jQuery?
- Replacing d3.transform in D3 v4
- Programmatically selecting partial text in an input field
- How to get the background color of an HTML element?
- How to silently hide “Image not found” icon when src source image is not found
- angularjs to output plain text instead of html
- How to access DOM elements in electron?
- node.js async/await using with MySQL
- Can you pass parameters to an AngularJS controller on creation?
- Angular2 router 2.0.0 not reloading components when same url loaded with different parameters?
- MongoDB select where in array of _id?
- Get element’s custom css properties (-mystyle) using JavaScript
- How to detect in iOS webapp when switching back to Safari from background?
- Search array of objects for entry matching variable and check if it matches other fields
- Javascript – if with asynchronous case
- How to go about debugging JavaScript in the HtmlService in Google Scripts
- How does JavaScript VM implements Object property access? Is it Hashtable?
- jQuery $(document).ready () fires twice
- How to call external JavaScript function in HTML
- Retrieving a property of a JSON object by index?
- How to detect if user has enabled full screen in browser
- setTimeout() method inside a while loop [duplicate]
- How to highlight a part part of an Input text field in HTML using Javascript or JQuery
- Load javascript async, then check DOM loaded before executing callback
- Tag-like autocompletion and caret/cursor movement in contenteditable elements
- How to prevent Next.js from instantiating a singleton class/object multiple times?