Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

この記事はまだボランティアによって 日本語 に翻訳されていません。ぜひ MDN に参加して翻訳を手伝ってください!

HTMLOptionsCollection is an interface representing a collection of HTML option elements (in document order) and offers methods and properties for traversing the list as well as optionally altering its items. This type is returned solely by the "options" property of select.

Properties

Name Type Description
length unsigned long As optionally allowed by the spec, Mozilla allows this property to be set, either removing options at the end when using a shorter length, or adding blank options at the end when setting a longer length. Other implementations could potentially throw a DOMException.

Methods

  • item(index) - returns the specific node at the given zero-based index (gives null if out of range)
  • namedItem(name) - returns the specific node with the given DOMString (i.e., string) id. Returns null if no such named node exists.

Specification

See also

ドキュメントのタグと貢献者

 このページの貢献者: fscholz, teoli, kscarfone, Sheppy, ethertank, mkato, Brettz9
 最終更新者: fscholz,