Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Select length Property

Select length Property

Select Object Reference Select object


Definition and Usage

The length property returns the number of options in the drop-down list.

Syntax

selectObject.length=

number


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the length property.


Example

Example

Display the number of options in the drop-down list:

Runoob Tutorial(runoob.com)

Try it »


Select Object Reference Select object