Click to return to the Reusing Browser Technology home page    
IHTMLElement2::getExpress...     IHTMLElement2::mergeAttri...     IHTMLElement2 Interface    
Web Workshop  |  Reusing Browser Technology

IHTMLElement2::insertAdjacentElement Method


Inserts the given element at the given location.

Syntax

HRESULT insertAdjacentElement(
    BSTR where,
    IHTMLElement *insertedElement,
    IHTMLElement **inserted
);

Parameters

where
String (BSTR) that specifies where to insert the element. It can be one of the following strings:
beforeBegin Inserts the element immediately before the element.
afterBegin Inserts the element after the start of the element but before all other content in the element.
beforeEnd Inserts the element immediately before the end of the element but after all other content in the element.
afterEnd Inserts the element immediately after the end of the element.
insertedElement
Address of an IHTMLElement interface that specifies the element to insert.
inserted
Address of a pointer to an IHTMLElement interface that specifies the element inserted.

Return Value

Returns S_OK if successful, or an error code otherwise.

See Also

applyElement, getAdjacentText, replaceAdjacentText



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.