Event objects Event
1. compatible
function(event){
//var event = event || window.event;
var event = window.event || arguments.callee.caller.arguments[0]; //火狐的兼容写法
}
2. Call
//事件
function add (event){
console.log(event)
}
1.html call
<!-- 正确使用 -->
<div onClick="add(event)">点击</div>
There are call the event object 2. The method method
function use(event){ //这里也要传event
add (event);
}
Summary: method invocation event, it must also pass a event, otherwise the low version of the browser will complain.