当前位置:
代码迷
>>
JavaScript
>> 如何判断鼠标是否在div上
详细解决方案
如何判断鼠标是否在div上
热度:
398
发布时间:
2013-12-13 13:57:17.0
怎么判断鼠标是否在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
查看全文
相关解决方案