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

What are the dom events in javascript

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly introduces "what dom events are there in javascript". In daily operation, I believe many people have doubts about what dom events are in javascript. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "what dom events are in javascript"! Next, please follow the editor to study!

Js dom events are: abort, afterprint, blur, canplay, change, click, copy, cut, dblclick, drag, drop, ended, error, focus, open, load, play, and so on.

The operating environment of this tutorial: windows7 system, javascript1.8.5 version, Dell G3 computer.

HTML DOM event

The HTML DOM event allows JavaScript to register different event handlers on elements in the HTML document.

Events are usually used in conjunction with functions, which are not executed until the event occurs (for example, when the user clicks a button).

Event description this event occurs when abort media loading is aborted. Afterprint this event occurs when the page starts printing, or when the print dialog box is closed. This event occurs when the animationendCSS animation is complete. This event occurs when animationiteration repeats the CSS animation. This event occurs at the beginning of the animationstartCSS animation. This event occurs when beforeprint is about to print a page. Beforeunload this event occurs before the document is about to be unloaded. Blur this event occurs when an element loses focus. Canplay this event occurs when the browser can start playing media. Canplaythrough this event occurs when the browser can play media without stopping buffering. Change this event occurs when the content, selection, or selected state of the form element changes. Click this event occurs when the user clicks the element. Contextmenu this event occurs when the user right-clicks an element to open the context menu. Copy this event occurs when a user copies the contents of an element. Cut this event occurs when the user cuts the contents of an element. Dblclick this event occurs when the user double-clicks the element. This event occurs when drag drags an element. Dragend this event occurs when the user has finished dragging the element. Dragenter this event occurs when the dragged element enters the drop target. Dragleave this event occurs when the dragged element leaves the placement target. Dragover this event occurs when the dragged element is above the drop target. Dragstart this event occurs when the user starts dragging the element. Drop this event occurs when a dragged element is placed on the drop target. This event occurs when the duration of the durationchange media changes. Ended this event occurs at the end of the media playback. Error this event occurs when an error occurs while loading an external file. This event occurs when the focus gets focus on the element. Focusin this event occurs when the element is about to gain focus. Focusout this event occurs when the element is about to lose focus. Fullscreenchange this event occurs when an element is displayed in full screen mode. Fullscreenerror this event occurs when an element cannot be displayed in full screen mode. Hashchange this event occurs when the anchor portion of the URL changes. Input this event occurs when the element gets user input. Invalid this event occurs when the element is invalid. Keydown this event occurs when the user is pressing a key. Keypress this event occurs when the user presses a key. Keyup this event occurs when the user releases the key. Load this event occurs when the object has been loaded. This event occurs after the loadeddata media data is loaded. This event occurs when loadedmetadata loads metadata, such as size and duration. Loadstart this event occurs when the browser starts looking for the specified media. This event occurs when message receives a message through this event source. Mousedown this event occurs when the user presses the mouse button on the element. Mouseenter this event occurs when the pointer moves over the element. Mouseleave this event occurs when the pointer is moved away from the element. Mousemove this event occurs when the pointer moves over the element. Mouseout this event occurs when the user moves the mouse pointer away from the element or a child of it. Mouseover this event occurs when the pointer moves over an element or a child of it. Mouseup this event occurs when the user releases the mouse button on the element. Offline this event occurs when the browser starts working offline. Online this event occurs when the browser starts working online. Open this event occurs when a connection to the event source is opened. Pagehide this event occurs when a user leaves a web page to navigate. Pageshow this event occurs when a user navigates to a web page. Paste this event occurs when a user pastes something into an element. Pause this event occurs when the media is paused by the user or programmatically. Play this event occurs when the media has started or is no longer paused. This event occurs when playing plays after the media is paused or stopped for buffering. This event occurs when the history of the popstate window changes. Progress this event occurs when the browser is in the process of obtaining media data. This event occurs when the playback speed of ratechange media changes. This event occurs when reset resets the form. This event occurs when resize resizes the document view. This event occurs when scroll scrolls the scroll bar of an element. Search this event occurs when the user enters something in the search field. Seeked this event occurs when the user finishes moving / jumping to a new location in the media. Seeking this event occurs when the user starts to move / jump to a new location in the media. This event occurs after the select user selects text (for and). Show this event occurs when the element is displayed as a context menu. Stalled this event occurs when a browser attempts to get media data but the data is not available. This event occurs when the storageWeb storage area is updated. This event occurs when submit submits the form. Suspend this event occurs when the browser intentionally does not get media data. Timeupdate this event occurs when the playback position changes. Toggle this event occurs when a user opens or closes an element. This event occurs when the touchcancel touch is interrupted. Touchend this event occurs when the finger is removed from the touchscreen. Touchmove this event occurs when a finger is dragged across the screen. Touchstart this event occurs when a finger is placed on the touchscreen. This event occurs when the transitionendCSS conversion is complete. This event occurs after the unload page is unloaded (for). Volumechange this event occurs when the volume of the media has changed. Waiting this event occurs when the media has been paused but is expected to resume. Wheel this event occurs when the mouse wheel scrolls up or down an element. At this point, the study of "what are the dom events in javascript" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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