MULTIPLE Attribute | multiple Property

Internet Development Index

Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.

Syntax

HTML<SELECT MULTIPLE ... >
ScriptingSELECT.multiple [ = bMultiple ]

Possible Values

bMultipleBoolean that specifies or receives one of the following values.
falseDefault. Multiple items cannot be selected.
trueMultiple items can be selected.

The property is read/write. The property has a default value of false.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties.

Example

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.

<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>
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

This property is defined in HTML 3.2 Non-Microsoft link and is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 Non-Microsoft link.

Applies To

SELECT

See Also

type