EventUtil.getEvent=function(e) { e = e || window.event; if (!e) { var c = this.getEvent.caller; while (c) { e = c.arguments[0]; if (e && Event == e.constructor) { break; } c = c.caller; } } return e; }代码很简单我就不多介绍了。。关键在于 caller;
EventUtil.getEvent=function(e) { e = e || window.event; if (!e) { var c = this.getEvent.caller; while (c) { e = c.arguments[0]; if (e && Event == e.constructor) { break; } c = c.caller; } } return e; }代码很简单我就不多介绍了。。关键在于 caller;