这是一个基于以下内容的更优雅的解决方案。它导致事件从多个级别的儿童中冒出来。它还解决了跨浏览器问题。function onMouseOut(this, event) {//this is the original element the event handler was assigned to var e = event.toElement || event.relatedTarget;//check for all children levels (checking from bottom up)while(e && e.parentNode && e.parentNode != window) { if (e.parentNode == this|| e == this) { if(e.preventDefault) e.preventDefault(); return false; } e = e.parentNode;}//Do something u need here}document.getElementById('parent').addEventListener('mouseout',onMouseOut,true);