Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
HTMLOptionsCollection インターフェイスは、 HTML の <option> 要素の集合を(文書内の順序で)表し、リストから選択すると共に、任意で項目を変更することもできるメソッドやプロパティを提供します。このオブジェクトが返されるのは、 select の options プロパティからのみです。
HTMLCollection HTMLOptionsCollectionunsigned long です。仕様上は、オプションで読み取り専用にしないことが認められています。値を下げることで末尾のオプションを削除したり、値を上げることで末尾に空白のオプションを追加したりすることができます。 Mozilla はこれを許可していますが、他の実装では DOMException が発生する可能性があります。
このインターフェイスは親である HTMLCollection からメソッドを継承しています。
| HTML # the-htmloptionscollection-interface |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025年4月12日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.