Allow multiple selection in a drop-down list:
The multiple property sets or returns whether more than one option/item can be selected from a drop-down list.
The multiple property is supported in all major browsers.
Return the multiple property:
Set the multiple property:
Value | Description |
---|---|
true|false |
Specifies whether more than one option in a drop-down list can be
selected
|
Return Value: | A Boolean, returns true if multiple selection in the drop-down list is enabled, otherwise it returns false |
---|
Find out if more than one option in a drop-down list can be selected:
The result of x will be:
HTML reference: HTML <select> multiple attribute