addEventListener('dragenter', function(e) {
//打印null
console.log(e.relatedTarget);
});
But when the event is mouseover
, the result can be printed normally.
I am puzzled, please ask for help
滿天的星座2017-07-05 11:03:35
relatedTarget event property returns the node related to the target node of the event.
For the mouseover event, this property is the node that the mouse pointer leaves when it moves to the target node.
For the mouseout event, this property is the node that the mouse pointer enters when leaving the target.
For other types of events, this attribute is not useful.