Questions tagged [selectedindex]

In HTML DOM, the selectedIndex property sets or returns the index of the selected option in a dropdown list. The index starts at 0.

354 questions
3
votes
7 answers

Specify a default selected item for HTML form drop-downs

Typically when you need to select an item by default, you do: element) when the change done by a simple assignment (like myElement.selectedIndex=1).