Select multipleProperty
Select Object
Definition and Usage
The multiple property sets or returns whether more than one option can be selected.
Syntax
Setting the multiple property:
selectObject.multiple=true|false
Returning the multiple property:
selectObject.multiple
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the multiple attribute
Examples
Example
Select multiple options in a dropdown:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Example Tutorial (example.com)</title>
<script>
function displayResult(){
document.getElementById("mySelect").multiple=true;
}
</script>
</head>
<body>
<form>
<select id="mySelect" size="4">
<option>Apple</option>
<option>Pear</option>
<option>Banana</option>
<option>Orange</option>
</select>
</form>
<button type="button" onclick="displayResult()">Allow multiple selections</button>
<p>Press the Ctrl key to select multiple options</p>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<title>Example Tutorial (example.com)</title>
<script>
function displayResult(){
document.getElementById("mySelect").multiple=true;
}
</script>
</head>
<body>
<form>
<select id="mySelect" size="4">
<option>Apple</option>
<option>Pear</option>
<option>Banana</option>
<option>Orange</option>
</select>
</form>
<button type="button" onclick="displayResult()">Allow multiple selections</button>
<p>Press the Ctrl key to select multiple options</p>
</body>
</html>
Try it Yourself »
Select Object Other Extensions