Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.
dhtml语法
HTML | <SELECT MULTIPLE
... >
|
---|
Scripting | SELECT.multiple [ = bMultiple ] |
---|
DHTML可能的值
bMultiple | Boolean that
specifies or receives one of the following values.false | Default. Multiple items cannot be selected. | true | Multiple 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.
DHTML代码范例
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.
是否符合公共标准
This property is defined in
HTML 3.2 and
is defined in
World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 .
Applies To
更多语法参考
type