selectedIndex
Description
The selectedIndex of HTMLOptionsCollection for JS returns the index of the first selected item, if any, or −1 if there is no selected item.
Changes the selection to the option element at index index in collection.
Syntax
collection.selectedIndex collection.selectedIndex = index
Parameters
index
The number of preceding siblings, or 0 if it has none.