A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/dom/HTMLElement/options below:

options ยท WebPlatform Docs

options

Property of dom/HTMLElementdom/HTMLElement

Syntax
var result = element.options;
element.options = value;
Examples

This example shows how to display the text and values of all option objects in the first select object in the document.

var coll = document.all.tags("SELECT");
if (coll.length>0) {
    for (i=0; i< coll(0).options.length; i++)
        alert("Element " + i + " is " + coll(0).options(i).text +
            " and has the value " + coll(0).options(i).value);
}
Notes Remarks

To delete an option object from a select object, assign the option object a null value. This compresses the array. If duplicate identifiers are found, a collection of those items is returned. Collections of duplicates must be referenced subsequently by ordinal position.

Syntax Standards information

There are no standards that apply here.

Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4