IHTMLElement::get_title
IHTMLElement

IHTMLElement::get_title


HRESULT get_title(
    BSTR *p
);

Retrieves the title of the style sheet.

p
Address of a string variable that receives the title. It is FALSE for style sheets that do not specify a title, and that title is not currently selected.

The application of individual style sheets can be turned on and off dynamically. Note that the value of this property is also controlled by whether titled style sheets are applied.

See also put_title

IHTMLElement::put_language

HRESULT put_language(
    BSTR v
);

Sets the language that the current script is written in.

v
String specifying the language. Can be one of the following values;
JScript Specifies that the script is written in JScript.
Jscript Specifies the language as JScript.
vbs Specifies the language is VBScript.
vbscript Specifies that the script is written in VBScript.

See also get_language

IHTMLElement::get_language

HRESULT get_language(
    BSTR *p
);

Retrieves the language that the current script is written in.

p
Address of a variable that receives the language. Can be one of these values:
JScript Specifies that the script is written in JScript.
Jscript Specifies the language as JScript.
vbs Specifies the language is VBScript.
vbscript Specifies that the script is written in VBScript.

See also put_language

IHTMLElement::put_onselectstart

HRESULT put_onselectstart(
    VARIANT v
);

Sets the inline script associated with the onselect event on the object.

v
VARIANT structure that contains the script to set.

See also get_onselectstart

IHTMLElement::get_onselectstart

HRESULT get_onselectstart(
    VARIANT *p
);

Retrieves the inline script associated with the onselect event on the object.

p
Address of a VARIANT structure to store the script.

See also put_onselectstart

IHTMLElement::scrollIntoView

HRESULT scrollIntoView(
    VARIANT varargStart
);

Scrolls the object into view, aligning it at either the top or bottom of the window.

varargStart
VARIANT structure containing a Boolean value specifying whether to place the object at the top of the window or at the bottom. If TRUE, the method scrolls the object so that its top is visible at the top of the window. If FALSE, the bottom of the object is visible at the bottom of the window. If no value is given, the object scrolls to the top by default.

Depending on the size of the given object and the current window, this method might not be able to put the item at the very top or very bottom, but will always position the object as close to the requested position as possible.

IHTMLElement::contains

HRESULT contains(
    IHTMLElement *pChild,
    VARIANT_BOOL *pfResult
);

Determines whether the given object is contained within the current object.

pChild
Address of the IHTMLElement interface of the element object to check.
pfResult
Address of a Boolean variable that receives TRUE if the pChild element is contained, or FALSE otherwise.

IHTMLElement::get_sourceIndex

HRESULT get_sourceIndex(
    long *p
);

Retrieves the ordinal position of the element in the source order.

p
Address of a long integer variable that receives the element's ordinal position.

IHTMLElement::get_recordNumber

HRESULT get_recordNumber(
    VARIANT *p
);

Retrieves the ordinal record from the data set that generated the element. Applies to a bound, repeated table.

p
Address of a VARIANT structure that receives the ordinal record.

This property can be used in conjunction with the ADO recordset available from every data source object through the object's recordset property.

IHTMLElement::put_lang

HRESULT put_lang(
    BSTR v
);

Sets the language to use.

v
String specifying an ISO standard language abbreviation.

The parser can use this property to determine how to display language-specific choices for quotations, numbers, and so on.

See also get_lang

IHTMLElement::get_lang

HRESULT get_lang(
    BSTR *p
);

Retrieves the current language.

p
Address of a string variable that receives the an ISO standard language abbreviation of the current language.

The parser can use this property to determine how to display language-specific choices for quotations, numbers, and so on.

See also put_lang

IHTMLElement::get_offsetLeft

HRESULT get_offsetLeft(
    long *p
);

Retrieves the calculated left position of the element, relative to the window.

p
Address of a long integer variable that receives the left position, in pixels.

IHTMLElement::get_offsetTop

HRESULT get_offsetTop(
    long *p
);

Retrieves the calculated top position of the element, relative to the element's parent.

p
Address of a long integer variable that receives the top position, in pixels.

IHTMLElement::get_offsetWidth

HRESULT get_offsetWidth(
    long *p
);

Retrieves the width of the element relative to the document's top-left corner.

p
Address of a long integer variable that receives the width, in pixels.

IHTMLElement::get_offsetHeight

HRESULT get_offsetHeight(
    long *p
);

Retrieves the height of the element, relative to the parent coordinate system.

p
Address of a long integer variable that receives the height, in pixels.

IHTMLElement::get_offsetParent

HRESULT get_offsetParent(
    IHTMLElement **p
);

Retrieves the container element object that defines the top and left offsets.

p
Address of a pointer to the IHTMLElement interface for the container element object.

IHTMLElement::put_innerHTML

HRESULT put_innerHTML(
    BSTR v
);

Sets the HTML between the start and end tags of the current element.

v
String specifying any combination of text and HTML tags.

When setting this property, the given string completely replaces the existing content of the element. If the string contains HTML tags, the string is parsed and formatted as it is placed into the document.

You cannot set this property while the document is loading. Wait for the onload event before attempting to set it.

See also get_innerHTML

IHTMLElement::get_innerHTML

HRESULT get_innerHTML(
    BSTR *p
);

Retrieves the HTML between the start and end tags of the current element.

p
Address of a string variable that receives the HTML. This can be any valid string containing any combination of text and HTML tags.

When setting this property, the given string completely replaces the existing content of the element. If the string contains HTML tags, the string is parsed and formatted as it is placed into the document.

You cannot set this property while the document is loading. Wait for the onload event before attempting to set it.

See also put_innerHTML

IHTMLElement::put_innerText

HRESULT put_innerText(
    BSTR v
);

Sets the text between the start and end tags of the current element.

v
String specifying the text. It can be any valid string.

When setting this property, the given string completely replaces the existing content of the element.

You cannot set this property while the document is loading. Wait for the onload event before attempting to set it.

See also get_innerText

IHTMLElement::get_innerText

HRESULT get_innerText(
    BSTR *p
);

Retrieves the text between the start and end tags of the current element.

p
Address of a string variable that receives the text. It can be any valid string.

When setting this property, the given string completely replaces the existing content of the element.

You cannot set this property while the document is loading. Wait for the onload event before attempting to set it.

See also put_innerText

IHTMLElement::put_outerHTML

HRESULT put_outerHTML(
    BSTR v
);

Replaces the current element object and its content with the given HTML.

v
String specifying the replacement HTML. It can be any valid string containing any combination of text and HTML tags.

When setting this property, the given string completely replaces the current element, including its start and end tags. If the string contains HTML tags, the string is parsed and formatted as it is placed into the document.

You cannot set this property while the document is loading. Wait for the onload event before attempting to set it.

See also get_outerHTML

IHTMLElement::get_outerHTML

HRESULT get_outerHTML(
    BSTR *p
);

Retrieves the current element object and its content in HTML.

p
Address of a string variable that receives the current element object, including its start and end tags, and the element's content in HTML. It can be any valid string containing any combination of text and HTML tags.

You cannot set this property while the document is loading. Wait for the onload event before attempting to set it.

See also put_outerHTML

IHTMLElement::put_outerText

HRESULT put_outerText(
    BSTR v
);

Sets the outerText property of the current element object.

v
String specifying the new text for the current element object. It can be any valid string.

You cannot set this property while the document is loading. Wait for the onload event before attempting to set it.

See also get_outerText

IHTMLElement::get_outerText

HRESULT get_outerText(
    BSTR *p
);

Retrieves the outerText property of the current element object.

p
Address of a string variable that receives the text of the current element object. It can be any valid string.

You cannot set this property while the document is loading. Wait for the onload event before attempting to set it.

See also put_outerText

IHTMLElement::insertAdjacentHTML

HRESULT insertAdjacentHTML(
    BSTR where,
    BSTR html
);

Inserts the given HTML text into the element object at the given location. If the text contains HTML tags, the method parses and formats the text as it inserts.

where
String specifying where to insert the HTML text. Can be one of these strings:
BeforeBegin Inserts the text immediately before the element.
AfterBegin Inserts the text after the start of the element but before all other content in the element.
BeforeEnd Inserts the text immediately before the end of the element but after all other content in the element.
AfterEnd Inserts the text immediately after the end of the element.
html
String specifying the HTML text to insert.

You cannot insert text while the document is loading. Wait for the onload event before attempting to call this method.

IHTMLElement::insertAdjacentText

HRESULT insertAdjacentText(
    BSTR where,
    BSTR text
);

Inserts the given text into the element object at the given place. The method inserts the text as plain text.

where
String specifying where to insert the text. Can be one of these strings:
BeforeBegin Inserts the text immediately before the element.
AfterBegin Inserts the text after the start of the element but before all other content in the element.
BeforeEnd Inserts the text immediately before the end of the element but after all other content in the element.
AfterEnd Inserts the text immediately after the end of the element.
text
String specifying the text to insert.

You cannot insert text while the document is loading. Wait for the onload event before attempting to call this method.

IHTMLElement::get_parentTextEdit

HRESULT get_parentTextEdit(
    IHTMLElement **p
);

Retrieves an object that can be used to create a text range that contains the original object.

p
Address of a pointer to the IHTMLElement interface for the new parent object. This parameter receives NULL if no suitable parent object exists.

IHTMLElement::get_isTextEdit

HRESULT get_isTextEdit(
    VARIANT_BOOL *p
);

Retrieves whether a text range object can be created using the given object.

p
Address of a Boolean variable that receives TRUE if a text range can be created, and FALSE otherwise.

Only the BODY, BUTTON, and TEXTAREA objects and an INPUT object having text input type can be used to create a text range object.

IHTMLElement::click

HRESULT click(void);

Simulates a click by causing the onclick event to fire.

IHTMLElement::get_filters

HRESULT get_filters(
    IHTMLFiltersCollection **p
);

Retrieves a collection of filter objects for an element.

p
Address of a pointer to the IHTMLFiltersCollection interface of the collection.

IHTMLElement::put_ondragstart

HRESULT put_ondragstart(
    VARIANT v
);

Sets the inline script associated with the ondragstart event on the object.

v
VARIANT structure that contains the script to set.

See also get_ondragstart

IHTMLElement::get_ondragstart

HRESULT get_ondragstart(
    VARIANT *p
);

Retrieves the inline script associated with the ondragstart event on the object.

p
Address of a VARIANT structure to store the script.

See also put_ondragstart

IHTMLElement::toString

HRESULT toString(
    BSTR *String
);

Retrieves a string representation of the element object.

String
Address of a string variable that receives the string representation.

IHTMLElement::put_onbeforeupdate

HRESULT put_onbeforeupdate(
    VARIANT v
);

Sets the inline script associated with the onbeforeupdate event on the object.

v
VARIANT structure that contains the script to set.

See also get_onbeforeupdate

IHTMLElement::get_onbeforeupdate

HRESULT get_onbeforeupdate(
    VARIANT *p
);

Retrieves the inline script associated with the onbeforeupdate event on the object.

p
Address of a VARIANT structure to store the script.

See also put_onbeforeupdate

IHTMLElement::put_onafterupdate

HRESULT put_onafterupdate(
    VARIANT v
);

Sets the inline script associated with the onafterupdate event on the object.

v
VARIANT structure that contains the script to set.

See also get_onafterupdate

IHTMLElement::get_onafterupdate

HRESULT get_onafterupdate(
    VARIANT *p
);

Retrieves the inline script associated with the onafterupdate event on the object.

p
Address of a VARIANT structure to store the script.

See also put_onafterupdate

IHTMLElement::put_onerrorupdate

HRESULT put_onerrorupdate(
    VARIANT v
);

Sets the inline script associated with the onerrorupdate event on the object.

v
VARIANT structure that contains the script to set.

See also get_onerrorupdate

IHTMLElement::get_onerrorupdate

HRESULT get_onerrorupdate(
    VARIANT *p
);

Retrieves the inline script associated with the onerrorupdate event on the object.

p
Address of a VARIANT structure to store the script.

See also put_onerrorupdate

IHTMLElement::put_onrowexit

HRESULT put_onrowexit(
    VARIANT v
);

Sets the inline script associated with the onrowexit event on the object.

v
VARIANT structure that contains the script to set.

See also get_onrowexit

IHTMLElement::get_onrowexit

HRESULT get_onrowexit(
    VARIANT *p
);

Retrieves the inline script associated with the onrowexit event on the object.

p
Address of a VARIANT structure to store the script.

See also put_onrowexit

IHTMLElement::put_onrowenter

HRESULT put_onrowenter(
    VARIANT v
);

Sets the inline script associated with the onrowenter event on the object.

v
VARIANT structure that contains the script to set.

See also get_onrowenter

IHTMLElement::get_onrowenter

HRESULT get_onrowenter(
    VARIANT *p
);

Retrieves the inline script associated with the onrowenter event on the object.

p
Address of a VARIANT structure to store the script.

See also put_onrowenter

IHTMLElement::put_ondatasetchanged

HRESULT put_ondatasetchanged(
    VARIANT v
);

Sets the inline script associated with the ondatasetchanged event on the object.

v
VARIANT structure that contains the script to set.

See also get_ondatasetchanged

IHTMLElement::get_ondatasetchanged

HRESULT get_ondatasetchanged(
    VARIANT *p
);

Retrieves the inline script associated with the ondatasetchanged event on the object.

p
Address of a VARIANT structure to store the script.

See also put_ondatasetchanged

IHTMLElement::put_ondataavailable

HRESULT put_ondataavailable(
    VARIANT v
);

Sets the inline script associated with the ondataavailable event on the object.

v
VARIANT structure that contains the script to set.

See also get_ondataavailable

IHTMLElement::get_ondataavailable

HRESULT get_ondataavailable(
    VARIANT *p
);

Retrieves the inline script associated with the ondataavailable event on the object.

p
Address of a VARIANT structure to store the script.

See also put_ondataavailable

IHTMLElement::put_ondatasetcomplete

HRESULT put_ondatasetcomplete(
    VARIANT v
);

Sets the inline script associated with the ondatasetcomplete event on the object.

v
VARIANT structure that contains the script to set.

See also get_ondatasetcomplete

IHTMLElement::get_ondatasetcomplete

HRESULT get_ondatasetcomplete(
    VARIANT *p
);

Retrieves the inline script associated with the ondatasetcomplete event on the object.

p
Address of a VARIANT structure to store the script.

See also put_ondatasetcomplete

IHTMLElement::put_onfilterchange

HRESULT put_onfilterchange(
    VARIANT v
);

Sets the inline script associated with the onfilterchange event on the object.

v
VARIANT structure that contains the script to set.

See also get_onfilterchange

IHTMLElement::get_onfilterchange

HRESULT get_onfilterchange(
    VARIANT *p
);

Retrieves the inline script associated with the onfilterchange event on the object.

p
Address of a VARIANT structure to store the script.

See also put_onfilterchange

IHTMLElement::get_children

HRESULT get_children(
    IDispatch **p
);

Retrieves the collection that contains all the immediate children of this object.

p
Address of a pointer to the IDispatch interface of the collection.

IHTMLElement::get_all

HRESULT get_all(
    IDispatch **p
);

Retrieves the collection of all the objects in the HTML that are within the scope of this object.

p
Address of a pointer to the IDispatch interface of the collection.

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.