Example
Allow multiple selection in a drop-down list:
document.getElementById("mySelect").multiple = true;
Try it Yourself »
Definition and Usage
The multiple property sets or returns whether more than one option/item can be selected from a drop-down list.
Browser Support
The multiple property is supported in all major browsers.
Syntax
Return the multiple property:
selectObject.multiple
Set the multiple property:
selectObject.multiple=true|false
Property Values
Value | Description |
---|---|
true|false |
Specifies whether more than one option in a drop-down list can be
selected
|
Technical Details
Return Value: | A Boolean, returns true if multiple selection in the drop-down list is enabled, otherwise it returns false |
---|
More Examples
Example
Find out if more than one option in a drop-down list can be selected:
var x = document.getElementById("mySelect").multiple;
The result of x will be:
false
Try it Yourself »
Related Pages
HTML reference: HTML <select> multiple attribute
< Select Object