Home Cooker Classes Others Rice CookerGX
Classes  >  element  >  InsertAdjacentText(string,string)
element class : InsertAdjacentText(string,string) method


Inserts a text at the specified position.


elementInstance.InsertAdjacentText(string where, string text)


stringwhereA string that indicates the position which to insert.
stringtextA Insert text.

Return value


Sample code

//anyElement is any instance of element type.

string where = "afterBegin"

string text = "any text";

anyElement.InsertAdjacentText(where, text);


It's a wrapper of the MSHTML.IHTMLElement.insertAdjacentText(String,String).

The following values can specify as the first argument.

beforeBegin: The previous sibling of the invoker element.

afterBegin: The first child of the invoker element.

beforeEnd: The last child of the invoker element.

afterEnd: The next sibling of the invoker element.

The text will automatically be HTML escaped.

Links for reference

Copyright © Rice All rights reserved.