Attribute for <SELECT ...>
MULTIPLE
MULTIPLE
designates that more than one option in the list can be selected. When creating a
multiple list it is almost always a good idea to also use the
SIZE
attribute.
this code |
produces this |
<SELECT NAME="toppings" MULTIPLE SIZE=5>
<OPTION VALUE="mushrooms">mushrooms
<OPTION VALUE="greenpeppers">green peppers
<OPTION VALUE="onions">onions
<OPTION VALUE="tomatoes">tomatoes
<OPTION VALUE="olives">olives
</SELECT>
|
|
How you go about selecting the options you want depends on the browser, but for most
browsers you hold down the CONTROL key while you click on the options you want.
Unfortunately this is confusing for many users. For shorter selection lists, it is much more
intuitive to use
checkboxes.
Consider if this list of checkboxes is clearer than the multiple
selection list above:
this code |
produces this |
<INPUT TYPE=CHECKBOX NAME="mushrooms">mushrooms<BR>
<INPUT TYPE=CHECKBOX NAME="greenpeppers">green peppers<BR>
<INPUT TYPE=CHECKBOX NAME="onions">onions<BR>
<INPUT TYPE=CHECKBOX NAME="tomatoes">tomatoes<BR>
<INPUT TYPE=CHECKBOX NAME="olives">olives
|
|