This specification does not define a standard mechanism for referring to HTML objects. However, scripts should refer to an element according to its assigned name. Otherwise, one or the other may be used. The user agent must pass it on as data to a script engine. Designers of each scripting language should recommend language-specific support for resolving this issue.
Intrinsic events Note.
The onunload event occurs when the user agent removes a document from a window or frame. The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements.