When event handling that is bound on a DOM element is written in a label, there are two known constants whose names are occupied, respectively:
Event: Represents the Events object, this: represents the element itself
Note: If the calling script method needs to use both objects, it must be passed in as a parameter
When event handling that is bound on a DOM element is not written in a tag, it is purely script bound, then:
Script Method 1th parameter: Automatically represents an Event object, this: automatically represents the element itself
Note: The 1th parameter name of the script method, whether it is write event, or X, or a, is represented as an event object,
If there is no write parameter name, you can also get the event object by Arguments[0].
In both cases, the formal parameters of the script method have a special case:
If the script method does not write the event parameter, but the method inside refers to the event variable, it can represent the properties of the Window object under IE, Firefox does not know the variable, and chrome will still be considered an event object. (if the parameter uses the event name, then the name can only be used as a formal parameter, and will not be recognized as a window property under IE)
Parameter descriptions for DOM element binding events