Name
HTMLSelectElement — a <select> element in an HTML form
Availability
DOM Level 1 HTML
Inherits from/Overrides
Node → Element → HTMLElement → HTMLSelectElement
Properties
-
boolean disabled If
true, the<select>element is disabled and the user may not interact with it. Mirrors thedisabledattribute.-
readonlyHTMLFormElementform The
<form>element that contains this one.-
readonly long length The number of
<option>elements contained by this<select>element. Same asoptions.length.-
boolean multiple If
true, the<select>element allows multiple options to be selected. Otherwise, the selections are mutually exclusive and only one may be selected at a time. Mirrors themultipleattribute.-
String name The name of this form element. Mirrors the
nameattribute.-
readonlyHTMLCollectionoptions An array (HTMLCollection) of HTMLOptionElement objects that represent the
<option>elements contained in this<select>element, in the order in which they appear.-
long selectedIndex The position of the selected option in the
optionsarray. If no options are selected, this property is -1. If multiple options are selected, this property returns the index of the first selected option.-
long size The number of options to display at once. If this property is 1, the
<select>element will typically be displayed using a drop-down menu or list. If it is greater than 1, the<select>is typically displayed using a fixed-size list control, with a scrollbar if necessary. Mirrors thesizeattribute. ...