Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

add method

Adds an OPTION child element to a specified SELECT parent element.

Internet Explorer 8

 

Syntax


HRESULT retVal = object.add(pElem, pvarBefore);

Parameters

pElem [in]

Type: IHTMLOptionElement

Pointer to the OPTION object to be added.

pvarBefore [in]

Type: VARIANT

Pointer to a VARIANT of type VT_I4 or one of the following types:

VT_DISPATCH

Object to insert before.

VT_UNKNOWN

Object to insert before.

VT_EMPTY

Default. Inserts the object at the end of the collection.

VT_NULL

Default. Same as VT_EMPTY.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The pvarBefore parameter specifies the zero-based index position in the collection or the object before which the element is inserted. If pvarBefore equals VT_EMPTY, VT_NULL, or -1, this method places the element at the end of the collection.

See also

add Method

 

 

Community Additions

ADD
Show:
© 2015 Microsoft