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

Description

Inserts a text at the specified position.

Syntax

elementInstance.InsertAdjacentText(string where, string text)

Arguments

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

Return value

None

Sample code

//anyElement is any instance of element type.

string where = "afterBegin"

string text = "any text";

anyElement.InsertAdjacentText(where, text);

Notes

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.