<OPTION>...[</OPTION>]
This describes an option in a listbox of a form. It is only valid inside the
SELECT element. It creates a selectable choice
from which the user can pick a value.
<!ELEMENT OPTION - O (#PCDATA) -- selectable choice -->
<!ATTLIST OPTION
%attrs; -- %coreattrs, %i18n, %events --
selected (selected) #IMPLIED
disabled (disabled) #IMPLIED -- unavailable in this context --
label %Text; #IMPLIED -- for use in hierarchical menus --
value CDATA #IMPLIED -- defaults to element content --
>
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
DISABLED
This attribute makes this option in the selection list non-functional, so the
user cannot select this option from the list.
LABEL
The label that will be used for the selection list.
SELECTED
This attribute indicates that this option is the default selected choice in
the listbox. If this attribute is not present in one of the options the first
option is the default value.
VALUE
If this attribute is present it specifies the value that has to be send to the
server instead of the value behind the option.
 |
<FORM>
What do you want on your pizza :
<SELECT>
<OPTION value="pepper">Extra peppers
<OPTION value="cheese" selected>Extra cheese
<OPTION value="pepper;cheese">Extra peppers & extra cheese
</SELECT>
</FORM>
|
|
 |
|