Today again encountered this problem, always do not know the difference between target and Currenttarget, Baidu search time to see the article explained very clearly, deliberately recorded under the record, in case of a rainy day:
What is the difference between target and currenttarget?
Plain and easy to say:
For example, there's A and B now,
A.addchild (B)
A monitor mouse click events
So when you click on B, Target is B,currenttarget is a
In other words, currenttarget is always the listener, and Target is the true issuer of the event.
Summarize:
Target in the phase of the event flow, the capture, the target, and the bubbling phase of the currenttarget. The two points are the same only when the event flow is at the target stage, and when in the capture and bubbling phase, target points to the object being clicked and Currenttarget to the object that is the current event activity (usually the parent).
The difference between target and currenttarget of event in JS