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

Description

Inserts a HTML at the specified position.

Syntax

elementInstance.InsertAdjacentHTML(string where, string html)

Arguments

ClassNameDescription
stringwhereA string that indicates the position which to insert.
stringhtmlA Insert HTML.

Return value

None

Sample code

//anyElement is any instance of element type.

string where = "afterBegin"

string html = "span element.";

anyElement.InsertAdjacentHTML(where, html);

Notes

It's a wrapper of the MSHTML.IHTMLElement.insertAdjacentHTML(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.

Links for reference

Copyright © Rice All rights reserved.