Select multiple attribute
Definition and Usage
multiple
Attribute settings or return whether multiple options/items can be selected from the dropdown list.
See also:
HTML Reference Manual:HTML <select> multiple Attribute
HTML Reference Manual:HTML <select> Tag
Example
Example 1
Allow multiple selections in the dropdown list:
document.getElementById("mySelect").multiple = true;
Example 2
Determine if multiple options can be selected from the dropdown list:
var x = document.getElementById("mySelect").multiple;
Syntax
Return multiple attribute:
selectObject.multiple
Set multiple attribute:
selectObject.multiple = true|false
Attribute value
Value | Description |
---|---|
true|false |
Specifies whether multiple options in the dropdown list can be selected.
|
Technical Details
Return Value: | Boolean value, returns true if multiple selections are enabled in the dropdown list; otherwise returns false. |
---|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |