I talked about the event object yesterday,
function calc(event){
var event=event||window.event
console.log(event);
}
The encapsulated function where the parameter event is abbreviated as follows
function calc(e){
var event=e||window.event
console.log(event);
}
will report an error
提示,event is not defined
So the solution is, don't shorthand.