<SELECT>...</SELECT>
This element lets you create a listbox as an input field on a form. It is only
valid inside the FORM element. The possible choices
of the listbox are created with the OPTION
element.
<!ELEMENT SELECT - - (OPTGROUP|OPTION)+ -- option selector -->
<!ATTLIST SELECT
%attrs; -- %coreattrs, %i18n, %events --
name CDATA #IMPLIED -- field name --
size NUMBER #IMPLIED -- rows visible --
multiple (multiple) #IMPLIED -- default is single selection --
disabled (disabled) #IMPLIED -- unavailable in this context --
tabindex NUMBER #IMPLIED -- position in tabbing order --
onfocus %Script; #IMPLIED -- the element got the focus --
onblur %Script; #IMPLIED -- the element lost the focus --
onchange %Script; #IMPLIED -- the element value was changed --
>
from the HTML 4.0 DTD,
"Copyright ©
World Wide Web Consortium,
(Massachusetts Institute of Technology,
Institut National de Recherche en Informatique et en Automatique,
Keio University).
All Rights Reserved."
Core attributes:
class
id
style
title
Internationalization attributes:
dir
lang
Events:
onclick
ondblclick
onmousedown
onmouseup
onmouseover
onmousemove
onmouseout
onkeypress
onkeydown
onkeyup
AUTOACTIVATE
Use the autoactivate attribute to activate the list automatically when the
viewer selects it.
When the autoactivate attribute is not specified for a list, the viewer must
press the GO button on the remote control (or Return on a keyboard) to activate
the list and select an item from it. Also, when autoactivate is not specified,
the arrow buttons on the remote control move the Highlight rectangle to the
next selectable item on the web page.
When the autoactivate attribute is specified for a list or when the viewer has
activated the list, the viewer can use the arrow buttons to move up and down
within the list. The viewer can select an item by pressing the GO button.
You can use the autoactivate attribute with the multiple attribute or with the
size attribute for sizes greater than 1.
BGCOLOR
Use the bgcolor attribute to set the background color for the list. The default
value for bgcolor is #afafaf. You can use the
bgcolor attribute with the multiple attribute or with the size attribute for
sizes greater than 1.
See the page Using colors for a description on
specifying colors.
DISABLED
This attribute makes the selection list non-functional, so the user cannot
select an option from this list.
EXCLUSIVE
Use the exclusive attribute to prevent duplicate entries in the list.
MULTIPLE
Default only one item can be selected. This attribute makes it possible to let
the user input multiple choices.
NAME
This attribute gives the input field a name which can be used by scripts.
ONBLUR
Specifies JavaScript code to execute when the field loses focus.
ONCHANGE
Specifies JavaScript code to execute when the value of the field is changed.
ONFOCUS
Specifies JavaScript code to execute when the field get the focus.
SELCOLOR
Use the selcolor attribute to set the background color for the selections in
the list. The default value for selcolor is
#eaeaea. You can use the selcolor attribute with
the multiple attribute or with the size attribute for sizes greater than 1.
See the page Using colors for a description on
specifying colors.
SHOWEMPTY
Use the showempty attribute to display empty lists with the empty string. You
can use the showempty attribute with the multiple attribute or with the size
attribute for sizes greater than 1.
SIZE
This sets the number of lines the field should be visible at one time.
TABINDEX
Description of the TABINDEX attribute
TEXT
Use the text attribute to set the color of the text for the items in the list.
You can use the text attribute with the multiple attribute or with the size
attribute for sizes greater than 1.
See the page Using colors for a description on
specifying colors.
USESTYLE
Use the usestyle attribute so that the text in the list is rendered in the
current style in effect for the page.
 |
<FORM>
What do you want on your pizza :
<SELECT multiple size="2">
<OPTION value="cheese">Cheese
<OPTION value="pepper">Peppers
<OPTION value="ansjovis">Ansjovis
<OPTION value="tomatoes">Tomatoes
</SELECT>
</FORM>
|
|
 |
|