84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
As shown in the picture, how to implement it, please ask for demo
Place a p outside p_1 and p_2, and then monitor the onmouseleave event of p?
demo
1. Place two p's on the same p, add a mouse out event on p3, but no events will be added on p1 and p2!
<p class='p3'> <p class="p_1"></p> <p class="p_2"></p> </p>
2. If the mouse comes out of p1 or p2 and the mouse does not enter p1 or p2 within 0.5 seconds, the method will be triggered. If entered within 0.5 seconds, the timer will be cleared and the method will not be triggered!
var timer=null; odvi1.onmouseover=odvi2.onmouseover=function () { clearTimeout(timer); } odvi1.onmouseout=odvi2.onmouseout=function () { timer=setTimeout(function () { alert("1111"); },500) }
Place a p outside p_1 and p_2, and then monitor the onmouseleave event of p?
demo
1. Place two p's on the same p, add a mouse out event on p3, but no events will be added on p1 and p2!
2. If the mouse comes out of p1 or p2 and the mouse does not enter p1 or p2 within 0.5 seconds, the method will be triggered. If entered within 0.5 seconds, the timer will be cleared and the method will not be triggered!