日期:2014-05-16 浏览次数:20362 次
function isMouseLeaveOrEnter(e, handler) { if (e.type != 'mouseout' && e.type != 'mouseover') 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); }
function setVisible(e,col){ if(isMouseLeaveOrEnter(e, col)){ col.childNodes[2].style.visibility = "visible"; } } function setInvisible(e, col){ if(isMouseLeaveOrEnter(e, col)){ col.childNodes[0].style.background = "#000"; col.childNodes[2].style.visibility = "hidden"; } }