Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The causes and Solutions of the New events in HTML5

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

The causes and solutions of the new events in HTML5. In view of this problem, this article introduces the corresponding analysis and solutions in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.

The HTML element can have event attributes that trigger behavior in the browser, such as launching a JavaScript when the user clicks a HTML element. The event attributes listed below can be inserted into the HTML tag to define the event behavior.

Differences between HTML 4.01 and HTML 5

New events in HTML 5: onabort, onbeforeunload, oncontextmenu, ondrag, ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop, onerror, onmessage, onmousewheel, onresize, onscroll, onunload.

HTML 4.01 attribute that is no longer supported: onreset.

Property value describes how to run a script when an abort event occurs in 45onabortscript. 5onbeforeonloadscript runs the script before the element is loaded. 5onblurscript runs the script when the element loses focus. 45onchangescript runs the script when the element changes. 45onclickscript allows scripts when the mouse is clicked. 45oncontextmenuscript runs the script when the menu is triggered. 5ondblclickscript runs the script when the mouse is double-clicked. 45ondragscript allows scripts as long as they are dragged. 5ondragendscript runs the script at the end of the drag operation. 5ondragenterscript executes the script when the element is dragged to a legitimate drop target. 5ondragleavescript when the element leaves the legitimate placement target. 5ondragoverscript executes the script whenever the element is being dragged on the legitimate drop target. 5ondragstartscript executes the script at the beginning of the drag operation. 5ondropscript executes the script when the element is being dragged. 5onerrorscript executes the script when an error occurs during element loading. 5onfocusscript executes the script when the element gets focus. 45onkeydownscript executes the script when the button is pressed. 45onkeypressscript executes the script when the key is pressed. 45onkeyupscript executes the script when the button is released. 45onloadscript executes the script when the document is loaded. 45onmessagescript executes the script when the message event is triggered. 5onmousedownscript executes the script when the mouse button is pressed. 45onmousemovescript executes the script when the mouse pointer moves. 45onmouseoverscript executes the script when the mouse pointer moves over an element. 45onmouseoutscript executes the script when the mouse pointer is moved out of the element. 45onmouseupscript executes the script when the mouse button is released. 45onmousewheelscript executes the script when the mouse wheel scrolls. 5onresetscript executes the script when the form is reset. Not supported. 4onresizescript runs the script when the element is resized. 5onscrollscript executes the script when the element scroll bar is scrolled. 5onselectscript executes the script when the element is selected. 45onsubmitscript runs the script when the form is submitted. 45onunloadscript runs the script when the document is unloaded. 5 the answers to the causes and solutions of the new HTML5 events are shared here. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report