javascript - DOM event relatedTarget is null problem
我想大声告诉你
我想大声告诉你 2017-07-05 11:01:35
0
1
906
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

我想大声告诉你
我想大声告诉你

reply all(1)
滿天的星座

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template