There are many types of events that can occur in a Web browser. As mentioned earlier, different event types have different information, and the " DOM3 Level Event" Specifies the following types of events.
- < Span style= "color: #000000; Font-style:normal; Font-variant:normal; " >uiuser interface
- Focus event, triggered when the element gets or loses focus; Mouse event: triggered when the user performs an action on the page with the mouse;
- Wheel event: triggered when using the mouse wheel (or similar device);
- Text event: triggered when text is entered in the document;
- keyboard events: triggered when a user performs an action on a page through the keyboard;
- Synthetic events: when for (
- change ( The structure changes when the trigger occurs.
- change name event: triggered when an element or attribute name changes. Such events have been deprecated, and no browsers have implemented them
In addition to these kinds of events, HTML5 also defines a set of events, and some browsers implement other proprietary events in the DOM and BOM. These proprietary events are typically tailored to the developer's needs, and there are no specifications, so implementations of different browsers may be inconsistent.
The following is a summary of the UI events and focus events in JavaScript Advanced programming:
UI events refer to events that are not necessarily related to user actions. These events exist in this or that form before the DOM specification appears , and are reserved for backwards compatibility in the DOM specification.
The focus event is triggered when the page element Gets or loses focus. With these events and in conjunction with the Document.hasfocus () method and the Document.activeelement attribute, you can know the whereabouts of the user on the page.
Event Type 1 in JavaScript (mind mapping for reading notes)