代码改变世界

随笔分类 -  JQuery

mouseenter 与 mouseover 的区别

2012-06-19 06:54 by Andy Ge, 295 阅读, 收藏,
摘要: 本质区别就是mouseover会被子元素的mouseover冒泡而触发,而mouseenter不被子元素事件冒泡而触发。试试效果就能明白,下面是html和jQuery的代码,需要引一个jQuery类库<html><head><scripttype="text/javascript"src="/jquery/jquery.js"></script><scripttype="text/javascript">x=0;y=0;$(document).ready(function() 阅读全文