html text common event method detailed description

The event is described as follows
onactivate: Triggered when the object is set as the active element.

onafterupdate: Triggered on the data binding object after successfully updating the associated object in the data source object.

onbeforeactivate: trigger immediately before the object is set to the current element.

onbeforecut: Triggered on the source object before the selected area is deleted from the document.

onbeforedeactivate: Triggered immediately before the activeElement changes from the current object to other objects in the parent document.

onbeforeeditfocus: Triggered before the object contained in the editable element enters the active state of the user interface or before the editable container becomes the selected area of ​​the control.

onbeforepaste: Triggered on the target object before pasting the selected area from the system clipboard to the document.

onbeforeupdate: Triggered on the data binding object before the associated object in the data source object is successfully updated.

onblur: Triggered when the object loses input focus.

onchange: Triggered when the content of the object or selected area changes.

onclick: Triggered when the user clicks the object with the left mouse button.

oncontextmenu: Triggered when the user right-clicks the client area to open the context menu.

oncontrolselect: Triggered when the user is about to make a control selection area for the object.

oncut: Triggered on the source element when the object or selected area is deleted from the document and added to the system clipboard.

ondblclick: Triggered when the user double-clicks the object.

ondeactivate: Triggered when activeElement changes from the current object to other objects in the parent document.

ondrag: Continuously trigger on the source object when dragging.

ondragend: Triggered on the source object when the user releases the mouse after the drag operation is over.

ondragenter: Triggered on the target element when the user drags an object to a legal drag target.

ondragleave: Triggered on the target object when the user moves the mouse out of the legal drag target during the drag operation.

ondragover: When the user drags an object across the legal drag target, it continues to trigger on the target element.

ondragstart: Triggered on the source object when the user starts to drag the text selection area or selected object.

ondrop: Triggered on the target object when the mouse button is released during a drag operation.

update: Triggered on the data binding object when an error occurs when updating the associated data in the data source object.

onfilterchange: Triggered when the visual filter changes state or completes the conversion.

onfocus: Triggered when the object gets focus.

onfocusin: Triggered before the element is about to be set to focus.

onfocusout: Triggers on the element that currently has focus immediately after moving the focus to other elements.

onhelp: Triggered when the user presses the F1 key when the browser is the current window.

onkeydown: Triggered when the user presses a keyboard key.

onkeypress: Triggered when the user presses a literal key.

onkeyup: triggered when the user releases the keyboard key.

onlosecapture: Triggered when the object loses mouse capture.

onmousedown: Triggered when the user clicks an object with any mouse button.

onmouseenter: Triggered when the user moves the mouse pointer into the object.

onmouseleave: triggered when the user moves the mouse pointer out of the object boundary.

onmousemove: Triggered when the user moves the mouse over the object.

onmouseout: Triggered 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: Triggered when the user releases the mouse button while the mouse is over the object.

onmousewheel: Triggered when the mouse wheel button rotates.

onmove: Triggered when the object moves.

onmoveend: Triggered when the object stops moving.

onmovestart: Triggered when the object starts to move.

onpaste: Triggered on the target object when the user pastes data to transfer data from the system clipboard to the document.

onpropertychange: Triggered when a property change occurs on the object.

onreadystatechange: Triggered when the state of the object changes.

onresize: Triggered when the size of the object is about to change.

onresizeend: Triggered when the user finishes changing the size of the object in the selected area of ​​the control.

onresizestart: Triggered when the user starts to change the size of the object in the selected area of ​​the control.

onselect: Triggered when the currently selected area changes.

onselectstart: Triggered when the object is about to be selected.

ontimeerror: Triggered unconditionally when an error occurs at a specific time, usually caused by setting the attribute to an invalid value.

The method is described as follows
addBehavior: attach a behavior to the element.

: Append a child element to the object.

applyElement: Make the element a child element or parent element of other elements.

attachEvent: Bind the specified function to the event so that the function is called whenever the event is triggered on the object.

blur: Make the element lose focus and trigger the onblur event.

clearAttributes: Delete all tag attributes and values ​​from the object.

click: trigger the onclick event to simulate a click.

cloneNode: Copy a reference to an object from the document hierarchy.

componentFromPoint: Returns the position of the object under the specified coordinates through a specific event.

contains: Check whether the object contains the given element.

createTextRange: Create a TextRange object for the element.

detachEvent: Cancel the binding of the specified function from the event, so that the function will not be notified when the event is triggered.

dragDrop: Initialize the drag event.

fireEvent: trigger the specified event of the object.

focus: Make the element focus and execute the code specified by the onfocus event.

getAdjacentText: Returns the adjacent text string.

getAttribute: Get the value of the specified tag attribute.

getAttributeNode: Get the attribute object referenced by the attribute.name property.

getBoundingClientRect: Gets the object bound to the specified TextRectangle object collection.

getClientRects: Get a collection of rectangles describing the content of the object or the layout of the client area. Each rectangle describes a straight line.

getExpression: Get the expression of a given attribute.

hasChildNodes: Returns the value indicating whether the object has children.

insertAdjacentElement: Insert an element at the specified position.

insertAdjacentHTML: Insert the given HTML text in the element at the specified position.

insertAdjacentText: Insert the given text at the specified position.

insertBefore: Insert elements in the document hierarchy.

mergeAttributes: Copy all read/write tag attributes to the specified element.

normalize: merge adjacent TextNode objects to generate a regular document object model.

releaseCapture: Release the mouse capture of the object in the current document.

removeAttribute: Remove the given tag attribute of the object.

removeAttributeNode: Delete the attribute object from the object.

removeBehavior: the behavior of separating elements.

removeChild: Remove child nodes from the element.

removeExpression: Remove the expression from the specified attribute.

removeNode: Remove the object from the document hierarchy.

replaceAdjacentText: Replace the adjacent text of the element.

replaceChild: Replace existing child elements with new child elements.

replaceNode: Replace the object with other elements.

scrollIntoView: Scroll the object to the visible range and arrange it to the top or bottom of the window.

select: Highlight the input area of ​​the form element.

setActive: Set the object as the current object without placing the object in focus.

setAttribute: Set the value of the specified tag attribute.

setAttributeNode: Set the attribute object as part of the object.

setCapture: Set the mouse capture of objects belonging to the current document.

setExpression: Set the expression of the specified object.

swapNode: swaps the positions of two objects in the document hierarchy.

Guess you like

Origin blog.csdn.net/qq_37192571/article/details/108882564