Methods
This section describes the methods supported by Document Object Model (DOM) objects associated with HTML elements and supporting objects.
In this section
| Topic | Description |
|---|---|
|
The abort method terminates a pending send. | |
|
Adds an element to the areas, controlRange, or options collection. | |
|
Adds a Range to the current selection. | |
|
Displays a dialog box containing an application-defined message. This method is not supported for Windows apps using JavaScript. | |
|
Adds or appends key/value pairs of data to a FormData object for use with XMLHttpRequest. | |
|
Makes the element either a child or parent of another element. | |
|
Causes the element to lose focus and fires the onblur event. | |
|
Returns whether a form will validate when it is submitted, without having to submit it. | |
|
Opens the system color-selection dialog box. | |
|
Clears the contents of the selection. | |
|
Removes all attributes and values from the object. | |
|
(Deprecated as of Microsoft Edge.) Removes one or more data formats from the clipboard through the dataTransfer object. For the clipboardData object, this method clears all formats. | |
|
Cancels the interval previously started using the setInterval method. | |
|
Cancels a time-out that was set with the setTimeout method. | |
|
Simulates a click by causing the onclick event to fire. | |
|
Closes the current browser window or HTML Application (HTA). Closes the app without prompting the user. To the user, it appears as though the app has crashed. | |
|
Closes an output stream and forces the sent data to display. | |
|
Replaces the current selection with an empty selection (or a caret) at the given offset. | |
|
Collapses or sets the insertion point or caret at the end of a selection object. | |
|
Collapses, or sets the insertion point or caret at the beginning of a selection object. | |
|
Returns the component located at the specified coordinates via certain events. | |
|
Displays a confirmation dialog box that contains an optional message as well as OK and Cancel buttons. This method is not supported for Windows apps using JavaScript. | |
|
Checks whether the given element is contained within the object. | |
|
Determines if the given node is included in the selection. | |
|
Creates a new img element of the specified width and height. This method cannot be called directly. See Image object. | |
|
Initializes a new option element. This method cannot be called directly. See Option object. | |
|
Note
createPopup is no longer supported. Starting with Internet Explorer 11, use a div, iframe, or other element with a relatively high z-index value. For info, see Compatibility changes.
Creates a popup window object. | |
|
Deletes the caption element and its contents from the table. | |
|
Removes the specified cell (td) from the table row, as well as from the cells collection. | |
|
Deletes the selected nodes from a document. | |
|
Removes the specified row (tr) from the element and from the rows collection. | |
|
Note
doScroll is no longer supported. Starting with IE11, use scrollLeft or scrollTop. For info, see Compatibility changes.
Simulates a click on a scroll bar component. | |
|
Initiates a drag event. | |
|
Cancels the current selection, sets the selection type to none, and sets the item property to | |
|
Moves the focus of the selection to a specified offset within the given node. | |
|
Displays the first page of records in the data set to which the table is bound. | |
|
Causes the element to receive the focus and executes the code specified by the onfocus event. | |
|
Retrieves the value of the specified attribute. | |
|
Obsolete. Returns the value of the named attribute from the userProfile object. This method is not supported for Windows apps using JavaScript. | |
|
Retrieves an object that specifies the bounds of a collection of TextRectangle objects. | |
|
Gets a Variant that specifies the character set of a given font. | |
|
Retrieves a collection of rectangles that describes the layout of the contents of an object or range within the client. Each rectangle describes a single line. | |
|
(Deprecated as of Microsoft Edge.) Gets the data in the specified format from the clipboard through the dataTransfer object or the clipboardData object. | |
|
Gets a collection of objects that are based on the value of the class attribute. | |
|
Retrieves a collection of objects based on the specified element name. | |
|
Returns a specified Range from a selection. The Range is specified by an index and cannot be greater than the number that is returned by rangeCount. | |
|
Returns an object that represents the current selection of the document. | |
|
Determines whether one or more attributes exist for the object. | |
|
Gets a value indicating whether the object currently has focus. | |
|
Closes the pop-up window. This method is not supported for Windows apps using JavaScript. | |
|
Creates a new cell in the table row (tr), and adds the cell to the cells collection. | |
|
Creates a new row (tr) in the table, and adds the row to the rows collection. | |
|
Retrieves an object from various collections, including the all collection. | |
|
Retrieves an object from an areas collection. | |
|
Retrieves an attribute for an element from an attributes collection. | |
|
Retrieves an object from the behaviorUrns collection. | |
|
Retrieves a string that specifies the name of a block format tag. | |
|
Retrieves an object from a documentCompatibleInfoCollection collection. | |
|
Retrieves a form object or an object from an elements collection. | |
|
Retrieves a select object or an object from an options collection. | |
|
Retrieves an object from a TextRectangle collection. | |
|
Displays the last page of records in the data set to which the table is bound. | |
|
Copies all read/write attributes to the specified element. | |
|
Moves the screen position of the window by the specified x and y offset values. | |
|
Moves a table row to a new position. | |
|
Moves the screen position of the upper-left corner of the window to the specified x and y position. | |
|
Determines whether an object matches the specified selector. | |
|
Retrieves an object or a collection from a specified collection. | |
|
Retrieves an object from an areas collection. | |
|
Retrieves a form object or an object from an elements collection. | |
|
Retrieves a select object or an object from an options collection. | |
|
Opens a new window and loads the document specified by a given URL. Navigates the app window to the specified location. | |
|
Opens a document for writing. Note Can also be used to behave like the open method of the window object if the url, name, features, and replace parameters are specified using the following syntax:
var retval = document.open(url, name, features, replace); Refer to the window.open reference for usage. | |
|
Displays the previous page of records in the data set to which the table is bound. | |
|
Removes an element from the collection. | |
|
Removes all ranges from a selection. | |
|
Removes an attribute from an object. | |
|
Removes a range from a selection. | |
|
Replaces the text adjacent to the element. | |
|
Simulates a mouse click on a reset button for the calling form. | |
|
Changes the current size of the window by the specified x- and y-offset. | |
|
Sets the size of the window to the specified width and height values. | |
|
Causes the window to scroll to the specified x- and y-offset at the upper-left corner of the window. | |
|
Causes the window to scroll relative to the current scrolled position by the specified x- and y-pixel offset. | |
|
Scrolls the window to the specified x- and y-offset. | |
|
Highlights the input area of a form element. | |
|
Replaces the current selection with all the contents of the given node. | |
|
Sets the object as active without setting focus to the object. | |
|
Sets the value of the specified attribute. | |
|
Sets the anchor (base) and focus (extent) boundary points for the selection. | |
|
Sets a custom error message that is displayed when a form is submitted. | |
|
Evaluates an expression each time a specified number of milliseconds has elapsed. | |
|
Sets the start and end positions of a selection in a text field. | |
|
Evaluates an expression after a specified number of milliseconds has elapsed. | |
|
Displays a pop-up window on the screen. This method is not supported for Windows apps using JavaScript. | |
|
Creates a modal dialog box that displays the specified HTML document. | |
|
Creates a modeless dialog box that displays the specified HTML document. | |
|
Decrements a range input control's value by the value given by the Step attribute. | |
|
Increments a range input control's value by the value given by the Step attribute. | |
|
Submits the form. | |
|
Retrieves a collection of objects that have the specified HTML tag name. | |
|
Removes dynamic HTML elements and attributes from an HTML fragment. | |
|
Allows updating the print settings for the page. | |
|
Writes one or more HTML expressions to a document in the specified window. | |
|
Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window. |