DHTML Methods
Total Page:16
File Type:pdf, Size:1020Kb
DHTML Methods MSDN Home > MSDN Library > HTML and Dynamic HTML > Reference DHTML Methods Internet Development Index This section contains a list of the methods exposed by the Dynamic HTML (DHTML) Object Model. Methods add Creates a new namespace object and adds it to the collection. add Adds an element to the areas, controlRange, or options collection. addBehavior Attaches a behavior to the element. AddChannel Presents a dialog box that enables the user to either add the channel specified, or change the channel URL if it is already installed. AddDesktopComponent Adds a Web site or image to the Microsoft® Active Desktop®. addElement Adds an element to the controlRange collection. AddFavorite Prompts the user with a dialog box to add the specified URL to the Favorites list. addImport Adds a style sheet to the imports collection for the specified style sheet. addPageRule Creates a new page object for a style sheet. addReadRequest Adds an entry to the queue for read requests. addRule Creates a new rule for a style sheet. alert Displays a dialog box containing an application-defined message. appendChild Appends an element as a child to the object. appendData Adds a new character string to the end of the object. applyElement Makes the element either a child or parent of another element. assign Loads a new HTML document. attachEvent Binds the specified function to an event, so that the function gets called whenever the event fires on the object. AutoCompleteSaveForm Saves the specified form in the AutoComplete data store. AutoScan Attempts to connect to a Web server by passing the specified query through completion templates. back Loads a previous URL from the History list. blur Causes the element to lose focus and fires the onblur event. http://msdn.microsoft.com/workshop/author/dhtml/reference/methods.asp (1 de 9) [09/06/2003 12:46:38] DHTML Methods ChooseColorDlg Opens the system color-selection dialog box. clear Clears the contents of the selection. clear Not currently supported. clearAttributes Removes all attributes and values from the object. clearData Removes one or more data formats from the clipboard through dataTransfer or clipboardData object. clearInterval Cancels the interval previously started using the setInterval method. clearRequest Clears all requests in the read-requests queue to prepare for new profile-information requests. clearTimeout Cancels a time-out that was set with the setTimeout method. click Simulates a click by causing the onclick event to fire. cloneNode Copies a reference to the object from the document hierarchy. close Closes an output stream and forces the sent data to display. close Closes the current browser window or HTML Application (HTA). collapse Moves the insertion point to the beginning or end of the current range. compareEndPoints Compares an end point of a TextRange object with an end point of another range. componentFromPoint Returns the component located at the specified coordinates via certain events. confirm Displays a confirmation dialog box that contains an optional message as well as OK and Cancel buttons. contains Checks whether the given element is contained within the object. createAttribute Creates an attribute object with a specified name. createCaption Creates an empty caption element in the table. createComment Creates a comment object with the specified data. createControlRange Creates a controlRange collection of nontext elements. createDocumentFragment Creates a new document. createElement Creates an instance of the element for the specified tag. createEventObject Generates an event object for passing event context information when using the fireEvent method. http://msdn.microsoft.com/workshop/author/dhtml/reference/methods.asp (2 de 9) [09/06/2003 12:46:38] DHTML Methods createPopup Creates a popup window. createRange Creates a TextRange object from the current text selection, or a controlRange collection from a control selection. createRangeCollection Creates a TextRange object collection from the current selection. createStyleSheet Creates a style sheet for the document. createTextNode Creates a text string from the specified value. createTextRange Creates a TextRange object for the element. createTFoot Creates an empty tFoot element in the table. createTHead Creates an empty tHead element in the table. deleteCaption Deletes the caption element and its contents from the table. deleteCell Removes the specified cell (td) from the table row, as well as from the cells collection. deleteData Removes a specified range of characters from the object. deleteRow Removes the specified row (tr) from the element and from the rows collection. deleteTFoot Deletes the tFoot element and its contents from the table. deleteTHead Deletes the tHead element and its contents from the table. detachEvent Unbinds the specified function from the event, so that the function stops receiving notifications when the event fires. doImport Dynamically imports an element behavior. doReadRequest Performs all requests located in the read-requests queue. doScroll Simulates a click on a scroll-bar component. dragDrop Initiates a drag event. duplicate Returns a duplicate of the TextRange. elementFromPoint Returns the element for the specified x and y coordinates. empty Cancels the current selection, sets the selection type to none, and sets the item property to null. execCommand Executes a command on the current document, current selection, or the given range. execScript Executes the specified script in the provided language. expand http://msdn.microsoft.com/workshop/author/dhtml/reference/methods.asp (3 de 9) [09/06/2003 12:46:38] DHTML Methods Expands the range so that partial units are completely contained. findText Searches for text in the document and positions the start and end points of the range to encompass the search string. fireEvent Fires a specified event on the object. firstPage Displays the first page of records in the data set to which the table is bound. focus Causes the element to receive the focus and executes the code specified by the onfocus event. forward Loads the next URL from the History list. getAdjacentText Returns the adjacent text string. getAttribute Retrieves the value of the specified attribute. getAttribute Returns the value of the named attribute from the userProfile object. getAttributeNode Retrieves an attribute object referenced by the attribute.name property. getBookmark Retrieves a bookmark (opaque string) that can be used with moveToBookmark to return to the same range. getBoundingClientRect Retrieves an object that specifies the bounds of a collection of TextRectangle objects. getCharset Retrieves a Variant that specifies the character set of the specified font. getClientRects 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. getData Retrieves the data in the specified format from the clipboard through the dataTransfer or clipboardData objects. getElementById Returns a reference to the first object with the specified value of the ID attribute. getElementsByName Retrieves a collection of objects based on the value of the NAME attribute. getElementsByTagName Retrieves a collection of objects based on the specified element name. getExpression Retrieves the expression for the given property. getNamedItem Retrieves an attribute specified with the name property using the attributes collection. go Loads a URL from the History list. hasChildNodes Returns a value that indicates whether the object has children. hasFeature Returns a value that indicates whether the object implements a specific Document Object Model (DOM) standard. hasFocus Retrieves the value indicating whether the object currently has focus. hide Closes the pop-up window. http://msdn.microsoft.com/workshop/author/dhtml/reference/methods.asp (4 de 9) [09/06/2003 12:46:38] DHTML Methods ImportExportFavorites Handles the importing and exporting of Microsoft Internet Explorer favorites. inRange Returns a value indicating whether one range is contained within another. insertAdjacentElement Inserts an element at the specified location. insertAdjacentHTML Inserts the given HTML text into the element at the location. insertAdjacentText Inserts the given text into the element at the specified location. insertBefore Inserts an element into the document hierarchy as a child node of a parent object. insertCell Creates a new cell in the table row (tr), and adds the cell to the cells collection. insertData Inserts a new character string in the object at a specified offset. insertRow Creates a new row (tr) in the table, and adds the row to the rows collection. isEqual Returns a value indicating whether the specified range is equal to the current range. IsSubscribed Retrieves a value indicating whether the client subscribes to the given channel. item Retrieves an attribute for an element from the attributes collection. item Retrieves an object from the bookmarks collection. item Retrieves an object from the controlRange collection. item Retrieves an object from the childNodes or children collection. item Retrieves a namespace object from the namespaces collection. item Retrieves an object from the pages collection. item Retrieves an object from the rules collection. item Retrieves an object from the all collection or various other collections. item Retrieves an object from the filters collection or various other collections. item Retrieves an object from the behaviorUrns collection. Item Retrieves a string that