Select multiple Property
Example
Allow multiple selection in a drop-down list:
document.getElementById("mySelect").multiple = true;
Try it Yourself »
Description
The multiple property sets or returns whether more than one option/item can be selected from a drop-down list.
Browser Support
Property | |||||
---|---|---|---|---|---|
multiple | Yes | Yes | Yes | Yes | Yes |
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;
Try it Yourself »
Related Pages
HTML reference: HTML <select> multiple attribute
❮ Select Object
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.