事件对象及其属性
$(function(){$('input').bind('click',function(e){alert(e); //获取对象//event对象的属性
alert(e.type);alert(e.target);alert(e.currentTarget);//得到监听元素的DOM,target是点的那个的DOM
});$('input').bind('mouseover',function(e){alert(e.relatedTarget);});$('input').bind('click',123,function(e){alert(e.data);});$(document).bind('click',function(e){alert(e.pageX + ',' + e.pageY);});});
转载于:https://www.cnblogs.com/by-dxm/p/6390529.html
总结
- 上一篇: 如何发布Jar包到Maven中央仓库
- 下一篇: 修改自己的centos输入法