event.target

event.target

event.targetReturns: Element

Description: The DOM element that initiated the event.

  • version added: 1.0event.target

The target property can be the element that registered for the event or a descendant of it. It is often useful to compare event.target to this in order to determine if the event is being handled due to event bubbling. This property is very useful in event delegation, when events bubble.

登录查看完整内容