Click to return to the DHTML, HTML     
METHODS Attribute | Metho...     NAME Attribute | name Pro...     DHTML Properties    
Web Workshop  |  DHTML, HTML & CSS

MULTIPLE Attribute | multiple Property


Sets or retrieves whether multiple items can be selected from a list.

Syntax

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

Possible Values

bMultiple Boolean that specifies one of the following values:
falseMultiple items cannot be selected.
trueMultiple items can be selected.

The property is read/write with 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 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.

Sample Code

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

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:

SELECT



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.