add method
Adds an OPTION child element to a specified SELECT parent element.
![]() |
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:
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
Show:
