为什么返回给jquery回调的事件对象(e)包含值为({})的“target”字段,但在记录为e时会产生一个url(“ http://www.myurl.com ”) 。目标?
“目标”字段不应该包含与 e.target 相同的值吗?它是如何工作的?我很困惑。
$('.ckfilter').click(function(e){
e.preventDefault();
console.log("e:",e);
console.log("e.target:",e.target);
});
e:
({originalEvent:({}),
type:"click",
isDefaultPrevented:function K() {return !0;},
timeStamp:22619729,
jQuery172031920598426947033:true,
toElement:(void 0),
screenY:328,
screenX:674,
pageY:204,
pageX:154,
offsetY:(void 0),
offsetX:(void 0),
fromElement:(void 0),
clientY:204,
clientX:154,
buttons:1,
button:0,
which:1,
view:({}),
target:({}),
shiftKey:false,
relatedTarget:null,
metaKey:false,
eventPhase:3,
currentTarget:({}),
ctrlKey:false,
cancelable:true,
bubbles:true,
altKey:false,
srcElement:(void 0),
relatedNode:(void 0),
attrName:(void 0),
attrChange:(void 0),
delegateTarget:({}),
data:null,
handleObj:{type:"click",
origType:"click",
data:null,
handler:(function (e) {e.preventDefault(); }),
guid:18,
selector:null,
quick:null,
namespace:""}
})
e.target: "http://www.myurl.com"