直接贴代码 $('#mouse').mouseover(function () { alert("悬浮") // 处理悬浮的逻辑 }).mouseout(function () { alert("移除") // 处理移除的逻辑 })