日期:2014-05-16  浏览次数:20393 次

怎么判断鼠标是否在div上
<input type="text">
<div style="width:400px; height:100px; background:#ccc; margin-top:10px;"></div>
当input失去焦点时,判断鼠标是否在div上

------解决方案--------------------
div添加onmouseover+mouseout事件就行了,mouseover设置全局遍历over为true,mouseout设置为false,blur的时候检查over是否为true