What is window.event in JavaScript?
问题 I just can't understand what window.event() does in JavaScript. It is used without any definition. Same thing for document.event() . I also don't understand the difference between these two. Do they accept any arguments? 回答1: An event is something that is called when something happens, so for example click and keypress are events. The reason however for window.event() is for cross browser compatibility. So here is some javascript: object.onclick = function(e) { // e holds all of the