multiple attribute | multiple property
Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.
![]() |
Syntax
| HTML | <element multiple="p" ... > |
|---|---|
| JavaScript | |
Property values
Type: Boolean
Standards information
- Document Object Model (DOM) Level 1 Specification, Section 2.5.5
- HTML 4.01 Specification, Section 17.6
Examples
This example uses the multiple attribute and the multiple property to switch between allowing the user to select one item or multiple items from a list.
Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/multiple.htm
<select id="oSelect" multiple> <option>Item 1</option> <option>Item 2</option> <option>Item 3</option> </select> :<button onclick="oSelect.multiple=false">One</button> <button onclick="oSelect.multiple=true">Many</button>
See also
Show:
