Home > Web Front-end > JS Tutorial > Summary of method examples of dynamically creating html tags in javascript

Summary of method examples of dynamically creating html tags in javascript

伊谢尔伦
Release: 2017-07-27 10:56:52
Original
1565 people have browsed it

HTML event attributes

Global event attributes: HTML 4 adds the ability for events to trigger actions in the browser, such as starting JavaScript when the user clicks on an element.

a. Window event attribute, for events triggered by the window object (applied to the tag), the commonly used one is onload.

b. Form event, an event triggered by actions within an HTML form (applied to almost all HTML elements, but most commonly used in form elements): commonly used ones are onblur, onfocus, onselect, and onsubmit.

c. keybord event

d.Mouse event, an event triggered by mouse or similar user actions: commonly used ones are onclick, onmouseover, and onmouseout.

e. Media event, an event triggered by media (such as video, image and audio) (applicable to all HTML elements, but commonly found in media elements, such as