A graphical Select list on an HTML form.
Platform Support
| IE | Mozilla | Netscape | Opera | Chrome | Safari | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 5.0+ | 1.0+ |
|---|
Constructors
| Constructor | Action | IE | Mozilla | Netscape | Opera | Chrome | Safari | ||
|---|---|---|---|---|---|---|---|---|---|
|
Select Constructor() : Select
Creates a new instance of a Select object.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 5.0+ | 1.0+ | ||
Select() : SelectCreates a new instance of a Select object. Returns
|
|||||||||
Properties
| Property | Action | IE | Mozilla | Netscape | Opera | Chrome | Safari |
|---|---|---|---|---|---|---|---|
|
onchange
: Function
Event handler for when a user changes the value of the Select list.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 5.0+ | 1.0+ |
|
|||||||
|
options
: Array
Array of the options available from the Select list.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 5.0+ | 1.0+ |
|
|||||||
|
length
: Number
Number of elements in the options array.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 5.0+ | 1.0+ |
|
|||||||
|
selectedIndex
: Number
Index in the options array for the selected option.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 5.0+ | 1.0+ |
|
|||||||
|
type
: String
Type of object represented by the Select list and whether or not multiple selections are allowed.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 5.0+ | 1.0+ |
|
|||||||
References
Form|HTMLElement|Input|Option|HTMLSelectElement
Availability
JavaScript 1.0|enhanced in JavaScript 1.1|W3C