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

Description

Returns a string that located at the specified position.

Syntax

elementInstance.GetAdjacentText(string where)

Arguments

ClassNameDescription
stringwhereA string that indicates the position of the text that want to get.

Return value

ClassDescription
stringA string that located at the specified position.

Sample code

//anyElement is any instance of element type.

string where = "afterBegin"

string text = anyElement.getAdjacentText(where);

Notes

It's a wrapper of the MSHTML.IHTMLElement2.getAdjacentText(String).

The following values can be specified as the 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.

Please note that an empty string is returned if a string does not exist at the specified position.

Links for reference

Copyright © Rice All rights reserved.