IHTMLElement::insertAdjacentHTMLIHTMLElement::insertAdjacentHTML*
*



Contents  *



Index  *Topic Contents
*Previous Topic: IHTMLElement::get_outerText
*Next Topic: IHTMLElement::insertAdjacentText

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.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.