Inserts the given text into the element object at the given place. The method inserts the text as plain text.
Syntax
HRESULT insertAdjacentText( BSTR where, BSTR text );
Parameters
- where
- String that specifies 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 that specifies the text to insert.
Return Value
Returns S_OK if successful, or an error code otherwise.
Remarks
You cannot insert text while the document is loading. Wait for the onload event before attempting to call this method.
Windows CE
Windows CE Use version 2.12 and later Minimum availability Internet Explorer 4.0