PHP
·
发表于 5年以前
·
阅读量:8410
function isMouseOut(e, handler) {
if (e.type !== "mouseout") {
return false;
}
var reltg = e.relatedTarget
? e.relatedTarget
: e.type === "mouseout"
? e.toElement
: e.fromElement;
while (reltg && reltg !== handler) {
reltg = reltg.parentNode;
}
return reltg !== handler;
}