事件对象及其属性

$(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