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

Description

Inserts a element before the specified child.

Syntax

elementInstance.InsertBefore(element newElement, element referenceElement)

Arguments

ClassNameDescription
elementnewElementA Insert element.
elementreferenceElementA child element that indicates the position which to insert.

Return value

None

Sample code

//anyElement and newElement are any instance of element type.

//referenceElement is a child of anyElement.

anyElement.InsertBefore(newElement, referenceElement);

Notes

It's a wrapper of the MSHTML.IHTMLDOMNode.insertBefore(IHTMLDOMNode,IHTMLDOMNode).

Please note that the return value is not.

Links for reference

Copyright © Rice All rights reserved.