Click to return to the Reusing Browser Technology home page    
IHTMLElement::get_id Meth...     IHTMLElement::get_innerTe...     IHTMLElement Interface    
Web Workshop  |  Reusing Browser Technology

IHTMLElement::get_innerHTML Method


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

Syntax

HRESULT get_innerHTML(
    BSTR *p
);

Parameters

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

Return Value

Returns S_OK if successful, or an error code otherwise.

Remarks

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.

Windows CE

Windows CE Use version 2.12 and later
Minimum availability Internet Explorer 4.0

IHTMLElement::put_innerHTML Method


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

Syntax

HRESULT put_innerHTML(
    BSTR v
);

Parameters

v
String (BSTR) that specifies any combination of text and HTML tags.

Return Value

Returns S_OK if successful, or an error code otherwise.

Remarks

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.

Windows CE

Windows CE Use version 2.12 and later
Minimum availability Internet Explorer 4.0


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.