2.1.2.4 insertAdjacentElement

insertAdjacentElement

The insertAdjacentElement method inserts an element at the specified location. Text cannot be inserted while a document is loading; the onload event must be completed before attempting to call the insertAdjacentElement method.

Parameters

sWhere

A String that specifies where to insert the HTML element, using one of the following values:

beforeBegin - Inserts oElement immediately before the object.

afterBegin - Inserts oElement after the start of the object, but before all other content in the object.

beforeEnd - Inserts oElement immediately before the end of the object, but after all other content in the object.

afterEnd - Inserts oElement immediately after the end of the object.

oElement

Object that specifies the element to be inserted adjacent to the object that invoked the insertAdjacentElement method.

Return Value

Returns an element object.

No JScript Error