事件对象在IE和FF下的兼容写法 function abc(event){ var e=event||window.event; //键盘码的捕获 var key=e.which||e.keyCode; //阻止事件响应 if(e.preventDefault){ e.preventDefault();//FF }else{ e.returnValue=false;//IE } }…
原文:https://medium.com/@florenceliang/javascript-event-delegation-and-event-target-vs-event-currenttarget-c9680c3a46d1 In this case, at the time you call console.log(e), there's a DOM element in the currentTarget property. But sometime later, that pro…