create method

Initializes a new option element. This method cannot be called directly. See Option object.

Syntax

object.create(text, value, defaultselected, selected)

Parameters

text [in, optional]

Type: Variant

A Variant of type String that specifies the text of the element.

value [in, optional]

Type: Variant

A Variant of type String that specifies the value of the element.

defaultselected [in, optional]

Type: Variant

A Variant of type Boolean that indicates whether this option is selected by default. If true, this option is selected by default; otherwise, it is not.

selected [in, optional]

Type: Variant

A Variant of type Boolean that indicates whether this is the default option in the select block. If true, this option is the default; otherwise, it is not.

Return value

Type: IHTMLOptionElement

The new option element.

Standards information

There are no standards that apply here.

Remarks

You can add the element to a select block by using the add method.

See also

Option
window
IHTMLOptionElement

 

 

Show:
© 2014 Microsoft