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

HTML DOM Select size Property

Select size Property

Select Object Reference Select object


Definition and Usage

The size property sets or returns the number of options displayed at once in the drop-down list.

Syntax

Set the size property:

selectObject.size=

integer

Return the size property:

selectObject.size


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the size property


Example

Example

Change the number of visible options in the drop-down list:

Runoob Tutorial(runoob.com)

Try it »


Select Object Reference Select object