IHTMLElement interface
This interface provides the ability to programmatically access the properties and methods that are common to all element objects.
Members
The IHTMLElement interface inherits from the IDispatch interface. IHTMLElement also has these types of members:
- Methods
- Properties
Methods
The IHTMLElement interface has these methods.
Method | Description |
---|---|
click | Simulates a click by causing the HTMLFrameSiteEvents::onclick event to fire. |
contains | Checks whether the given element is contained within the object. |
getAttribute | Retrieves the value of the specified attribute. |
insertAdjacentHTML | Inserts the given HTML text into the element at the location. |
insertAdjacentText | Inserts the given text into the element at the specified location. |
removeAttribute | Removes an attribute from an object. |
scrollIntoView | Causes the object to scroll into view, aligning it either at the top or bottom of the window. |
setAttribute | Sets the value of the specified attribute. |
Properties
The IHTMLElement interface has these properties.
Property | Description |
---|---|
Sets or retrieves the class of the object. |
|
Sets or retrieves the string identifying the object. |
|
Sets or retrieves the HTML between the start and end tags of the object. |
|
Sets or retrieves the text between the start and end tags of the object. |
|
Retrieves whether a TextRange object can be created using the object. |
|
Sets or retrieves the language to use. |
|
Sets or retrieves the language in which the current script is written.
Note This has been superceded by the type attribute for the script element. If you are using javascript alone, you don't need to specify a type or language with the script element.
|
|
Retrieves the height of the object relative to the layout or coordinate parent, as specified by the IHTMLElement::offsetParent property. |
|
Retrieves the calculated left position of the object relative to the layout or coordinate parent, as specified by the IHTMLElement::offsetParent property. |
|
Retrieves a reference to the container object that defines the IHTMLElement::offsetTop and IHTMLElement::offsetLeft properties of the object. |
|
Retrieves the calculated top position of the object relative to the layout or coordinate parent, as specified by the IHTMLElement::offsetParent property. |
|
Retrieves the width of the object relative to the layout or coordinate parent, as specified by the IHTMLElement::offsetParent property. |
|
Sets or retrieves the object and its content in HTML. |
|
Sets or retrieves the text of the object. |
|
Retrieves the parent object in the object hierarchy. |
|
Retrieves the container object in the document hierarchy that can be used to create a TextRange containing the original object. |
|
Retrieves the ordinal record from the data set that generated the object. |
|
Retrieves the ordinal position of the object, in source order, as the object appears in the document's all collection. |
|
Retrieves the tag name of the object. |
|
Sets or retrieves advisory information (a ToolTip) for the object. |
Requirements
Minimum supported client |
Windows XP |
Minimum supported server |
Windows 2000 Server |
Header |
Mshtml.h |
IDL |
Mshtml.idl |
DLL |
Mshtml.dll |