Common htmltext events and methods-detailed descriptions-HTML/Xhtml-web page creation

Source: Internet
Author: User
This article collects common htmltext events and methods for ease of use at work. If you need them, refer Event Description
Onactivate: triggered when the object is set to an active element.
Onafterupdate: triggered when the associated object in the data source object is updated successfully on the Data Binding object.
Onbeforeactivate: the object is triggered immediately before it is set to the current element.
Onbeforecut: triggered in the source object before being deleted from the document in the Central Election area.
Onbeforedeactivate: triggered immediately before activeElement changes from the current object to another object in the parent document.
Onbeforeeditfocus: triggers an object that contains editable elements before it enters the user interface activation status or before the Editable container changes to the control selected area.
Onbeforepaste: triggered on the target object before pasting from the system clipboard to the document in the selected area.
Onbeforeupdate: triggered when the associated object in the data source object is successfully updated on the Data Binding object.
Onblur: triggered when the object loses the input focus.
Onchange: triggered when the content of the object or selected area changes.
Onclick: triggered when you left-click an object.
Oncontextmenu: triggered when you right-click the user area to open the context menu.
Oncontrolselect: triggered when you want to create a control area for this object.
Oncut: triggered when an object or selected area is deleted from the document and added to the system clipboard.
Ondblclick: triggered when you double-click an object.
Ondeactivate: triggered when activeElement changes from the current object to another object in the parent document.
Ondrag: It is triggered continuously on the source object during the drag operation.
Ondragend: triggered when you release the mouse after the drag operation ends on the source object.
Ondragenter: triggered when you drag an object to a valid drag target element.
Ondragleave: triggered when you move the mouse out of a valid drag target during the drag operation.
Ondragover: The drag object is triggered continuously on the target element when it is dragged across valid targets.
Ondragstart: triggered when the user starts to drag the selected text area or the selected object on the source object.
Ondrop: triggered when the mouse button is released during the drag operation on the target object.
Onerrorupdate: When an error occurs while updating the associated data in the data source object, it is triggered on the Data Binding object.
Onfilterchange: triggered when the visual filter changes the status or completes the conversion.
Onfocus: triggered when the object obtains the focus.
Onfocusin: triggered before the element is set to focus.
Onfocusout: triggered immediately after moving the focus to other elements on the element with the current focus.
Onhelp: this function is triggered when the browser presses the F1 key for the current window.
Onkeydown: triggered when you press the keyboard button.
Onkeypress: triggered when the user presses the literal key.
Onkeyup: triggered when the user releases the keyboard button.
Onlosecapture: triggered when the object loses Mouse capture.
Onmousedown: triggered when you click an object with any mouse button.
Onmouseenter: triggered when you move the mouse pointer to an object.
Onmouseleave: triggered when the user moves the mouse pointer out of the Object Boundary.
Onmousemove: triggered when you hover the mouse over an object.
Onmouseout: triggered when the user moves the mouse pointer out of the Object Boundary.
Onmouseover: triggered when you move the mouse pointer to an object.
Onmouseup: triggered when the user releases the mouse button when the mouse is over the object.
Onmousewheel: triggered when the scroll wheel button is rotated.
Onmove: triggered when the object moves.
Onmoveend: triggered when the object is stopped.
Onmovestart: triggered when the object begins to move.
Onpaste: triggered on the target object when you paste data to transfer data to the document from the system clipboard.
Onpropertychange: triggered when property changes occur on the object.
Onreadystatechange: triggered when the object status changes.
Onresize: triggered when the object size is about to change.
Onresizeend: triggered when the user changes the object size in the selected area of the control.
Onresizestart: triggered when the user begins to change the object size in the selected area of the control.
Onselect: triggered when the selected area changes.
Onselectstart: triggered when the object is to be selected.
Ontimeerror: It is triggered unconditionally when an error occurs at a specific time. It is usually caused by setting the attribute to an invalid value.

Method description
AddBehavior: attaches an action to an element.
AppendChild: append a child element to the object.
ApplyElement: Used to make an element a child or parent element of another element.
AttachEvent: binds a specified function to an event so that the function is called whenever the event is triggered on an object.
Blur: gets the element out of focus and triggers the onblur event.
ClearAttributes: deletes all tag attributes and values from an object.
Click: triggers the onclick event to simulate a click.
CloneNode: Copies references to objects at the document level.
ComponentFromPoint: return the position of the object under the specified coordinate through a specific event.
Contains: Check whether the object contains the given element.
CreateTextRange: Creates a TextRange object for the element.
DetachEvent: cancels binding of the specified function from the event, so that the function will not receive notifications when the event is triggered.
DragDrop: Initialize the drag event.
FireEvent: triggers the specified event of the object.
Focus: gets the element focus and executes the code specified by the onfocus event.
GetAdjacentText: returns an adjacent text string.
GetAttribute: Get the value of the specified tag attribute.
GetAttributeNode: gets the attribute object referenced by attribute. name.
GetBoundingClientRect: obtains the objects bound to the specified TextRectangle object set.
GetClientRects: obtains the content of the description object or the rectangular set of the layout in the customer zone. Each rectangle describes a straight line.
GetExpression: Get the expression of the given attribute.
HasChildNodes: returns the value indicating whether the object has a sub-object.
InsertAdjacentElement: insert an element at a specified position.
InsertAdjacentHTML: inserts the specified HTML text into the element at the specified position.
InsertAdjacentText: insert the specified text at the specified position.
InsertBefore: inserts an element at the document level.
MergeAttributes: Copies all read/write tag attributes to the specified element.
Normalize: merges adjacent TextNode objects to generate a Common Document Object Model.
ReleaseCapture: Release the Mouse capture of objects in the current document.
RemoveAttribute: delete a given tag attribute of an object.
RemoveAttributeNode: deletes an attribute object from an object.
RemoveBehavior: Action of separating elements.
RemoveChild: deletes a subnode from an element.
RemoveExpression: deletes an expression from a specified attribute.
RemoveNode: delete an object from the document level.
ReplaceAdjacentText: Replace the adjacent Text of the element.
ReplaceChild: replace an existing child element with a new child element.
ReplaceNode: replace objects 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 to the current object without setting the object to focus.
SetAttribute: set the value of the specified tag attribute.
SetAttributeNode: sets attribute objects as part of objects.
SetCapture: Set the Mouse capture of objects in the current document.
SetExpression: Set the expression of the specified object.
SwapNode: Switch the location of two objects in the document hierarchy.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.