Instance properties
HTMLOptionsCollection.length-
Returns or sets the number of options in the collection.
HTMLOptionsCollection.selectedIndex-
The index number of the first selected
<option>element. The value-1indicates no element is selected.
Instance methods
This interface inherits the methods of its parent, HTMLCollection.
HTMLOptionsCollection.add()-
Appends an
HTMLOptionElementorHTMLOptGroupElementelement to the collection ofoptionelements or adds it before a specified option. HTMLOptionsCollection.remove()-
Removes the element at the specified index from the options collection.
Specifications
| Specification |
|---|
| HTML # the-htmloptionscollection-interface |