target Returns a reference to the target to which the event was originally dispatched. Syntax targ = event.target Parameters targ is a reference to an EventTarget. Example d = document.getElementById("d1"); if e.target != d resetGame(); // not my event! Notes Additional notes. Specification target
Returns a reference to the target to which the event was originally dispatched.
targ = event.target
targ is a reference to an EventTarget.
d = document.getElementById("d1"); if e.target != d resetGame(); // not my event!
Additional notes.
target