Translation of frequently used JavaScript events_Basic knowledge
onabort Fires when the user interrupts downloading an image.
onactivate Fires when an object is set as an active element.
onafterprint Triggers on the object immediately after the document associated with the object is printed or print previewed.
onafterupdate is triggered on the data binding object when the associated object in the data source object is successfully updated.
onbeforeactivate The object should be triggered immediately before it is set to the current element.
onbeforecopy is triggered on the source object before the selection is copied to the system clipboard.
onbeforecut is triggered on the source object before the selection is deleted from the document.
onbeforedeactivate is triggered immediately before activeElement changes from the current object to another object in the parent document.
onbeforeeditfocus is triggered before the object contained in the editable element enters the user interface activation state or before the editable container becomes the control selection area.
onbeforepaste is triggered on the target object before the selection is pasted from the system clipboard to the document.
onbeforeprint is triggered on the object before its associated document is printed or print previewed.
onbeforeunload is triggered before the page is about to be unloaded.
onbeforeupdate is triggered on the data binding object before the associated object in the data source object is successfully updated.
onblur is triggered when the object loses input focus.
onbounce is triggered when the behavior property of the marquee object is set to "alternate" and the content of the subtitle reaches the side of the window.
oncellchange is triggered when the data in the data provider changes.
onchange Triggered when the object or the content of the selected area changes.
onclick is triggered when the user clicks the object with the left mouse button.
oncontextmenu is triggered when the user right-clicks the client area to open the context menu.
oncontrolselect Fires when the user is about to create a control selection area for the object.
oncopy Fires on the source element when the user copies an object or selection and adds it to the system clipboard.
oncut Fires on the source element when the object or selection is removed from the document and added to the system clipboard.
ondataavailable is triggered whenever the data of the data source object that asynchronously transmits data arrives.
ondatasetchanged Triggered when the data set corresponding to the data source object changes.
Ondatasetcomplete triggering indicates that all data of the data source object is available.
ondblclick Fires when the user double-clicks the object.
ondeactivate is triggered when activeElement changes from the current object to another object in the parent document.
ondrag is continuously triggered on the source object when a drag operation is performed.
ondragend Fires on the source object when the user releases the mouse after the drag operation.
ondragenter is triggered on the target element when the user drags an object to a legal drag target.
ondragleave is triggered on the target object when the user moves the mouse out of the legal drag target during the drag operation.
ondragover continues to be triggered on the target element when the user drags the object across the legal drag target.
ondragstart is triggered on the source object when the user starts dragging the text selection area or selected object.
ondrop Fires on the target object when the mouse button is released during a drag operation.
onerror Triggered when an error occurs during object loading.
onerrorupdate is triggered on the data binding object when an error occurs when updating the associated data in the data source object.
onfilterchange Fires when a visual filter changes state or completes a transition.
onfinish is triggered when the subtitle loop is completed.
onfocus Fires when the object gains focus.
onfocusin Fires before the element is about to be set as focus.
onfocusout is triggered on the element that currently has focus immediately after moving focus to other elements.
onhelp Triggered when the user presses the F1 key when the browser is the current window.
onkeydown Fires when the user presses a keyboard key.
onkeypress Fires when the user presses a literal key.
onkeyup Fires when the user releases a keyboard key.
onlayoutcomplete Fires when the print or print preview layout process has completed filling the current LayoutRect object with the content from the source document.
onload is triggered immediately after the browser completes loading the object.
onlosecapture Fires when the object loses mouse capture.
onmousedown Fires when the user clicks an object with any mouse button.
onmouseenter Fires when the user moves the mouse pointer into the object.
onmouseleave Triggered when the user moves the mouse pointer outside the bounds of the object.
onmousemove is triggered when the user moves the mouse over the object.
onmouseout Fires when the user moves the mouse pointer out of the object boundary.
onmouseover Triggered when the user moves the mouse pointer into the object.
onmouseup Fires when the user releases the mouse button while the mouse is over the object.
onmousewheel Fires when the mouse wheel button is rotated.
onmove is triggered when the object moves.
onmoveend is triggered when the object stops moving.
onmovestart Fires when the object starts moving.
onpaste Fires on the target object when the user pastes data to transfer data from the system clipboard to the document.
onpropertychange is triggered when a property change occurs on the object.
onreadystatechange is triggered when the object state changes.
onreset Fires when the user resets the form.
onresize Triggered when the size of the object is about to change.
onresizeend is triggered when the user changes the size of the object in the selected area of the control.
onresizestart Fires when the user starts to change the size of the object in the selection area of the control.
onrowenter is triggered to indicate that the current row has been changed in the data source and new data values are available on the object.
onrowexit is triggered when the data source control changes the current row of the object.
onrowsdelete Fires when a row is about to be deleted from the recordset.
onrowsinserted Triggered when a new row is inserted into the current recordset.
onscroll Fires when the user scrolls the scroll bar of the object.
onselect is triggered when the current selection changes.
onselectionchange Fires when the selected state of the document changes.
onselectstart Triggers when the object is about to be selected.
onstart is triggered at the beginning of each loop of the marquee object.
onstop is triggered when the user clicks the stop button or leaves the web page.
onsubmit is triggered when the form is about to be submitted.
onunload is triggered immediately before the object is unloaded.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











Python is more suitable for beginners, with a smooth learning curve and concise syntax; JavaScript is suitable for front-end development, with a steep learning curve and flexible syntax. 1. Python syntax is intuitive and suitable for data science and back-end development. 2. JavaScript is flexible and widely used in front-end and server-side programming.

The shift from C/C to JavaScript requires adapting to dynamic typing, garbage collection and asynchronous programming. 1) C/C is a statically typed language that requires manual memory management, while JavaScript is dynamically typed and garbage collection is automatically processed. 2) C/C needs to be compiled into machine code, while JavaScript is an interpreted language. 3) JavaScript introduces concepts such as closures, prototype chains and Promise, which enhances flexibility and asynchronous programming capabilities.

The main uses of JavaScript in web development include client interaction, form verification and asynchronous communication. 1) Dynamic content update and user interaction through DOM operations; 2) Client verification is carried out before the user submits data to improve the user experience; 3) Refreshless communication with the server is achieved through AJAX technology.

JavaScript's application in the real world includes front-end and back-end development. 1) Display front-end applications by building a TODO list application, involving DOM operations and event processing. 2) Build RESTfulAPI through Node.js and Express to demonstrate back-end applications.

Understanding how JavaScript engine works internally is important to developers because it helps write more efficient code and understand performance bottlenecks and optimization strategies. 1) The engine's workflow includes three stages: parsing, compiling and execution; 2) During the execution process, the engine will perform dynamic optimization, such as inline cache and hidden classes; 3) Best practices include avoiding global variables, optimizing loops, using const and lets, and avoiding excessive use of closures.

Python and JavaScript have their own advantages and disadvantages in terms of community, libraries and resources. 1) The Python community is friendly and suitable for beginners, but the front-end development resources are not as rich as JavaScript. 2) Python is powerful in data science and machine learning libraries, while JavaScript is better in front-end development libraries and frameworks. 3) Both have rich learning resources, but Python is suitable for starting with official documents, while JavaScript is better with MDNWebDocs. The choice should be based on project needs and personal interests.

Both Python and JavaScript's choices in development environments are important. 1) Python's development environment includes PyCharm, JupyterNotebook and Anaconda, which are suitable for data science and rapid prototyping. 2) The development environment of JavaScript includes Node.js, VSCode and Webpack, which are suitable for front-end and back-end development. Choosing the right tools according to project needs can improve development efficiency and project success rate.

C and C play a vital role in the JavaScript engine, mainly used to implement interpreters and JIT compilers. 1) C is used to parse JavaScript source code and generate an abstract syntax tree. 2) C is responsible for generating and executing bytecode. 3) C implements the JIT compiler, optimizes and compiles hot-spot code at runtime, and significantly improves the execution efficiency of JavaScript.
