item
Description
The item of HTMLOptionsCollection for JS returns the element with index index from the collection. The elements are sorted in tree order.
When index is a greater number than the number of items in collection, adds new blank option elements in the corresponding container.
When set to null, removes the item at index index from collection.
When set to an option element, adds or replaces it at index index in collection.
Syntax
element = collection.item(index) element = collection[index] collection[index] = element
Parameters
index
The number of preceding siblings, or 0 if it has none.