HTML - статьи

OPTION


Description

The OPTION element identifies a choice in a SELECT element,

which in turn is part of the contents of a FORM element.

SELECTED specifies that this option is selected by default.

If SELECT allows MULTIPLE, then multiple options may be SELECTED.

If the VALUE attribute it not present and the OPTION is selected,

the OPTION contents is returned upon submission of the FORM.

If the VALUE attribute is present and the OPTION is selected,

the value of the VALUE attribute is returned instead of the contents.

Minimum Attributes

<OPTION>characters...

All Possible Attributes

<OPTION SELECTED VALUE="..."



LANG="..."

DIR=ltr|rtl

ID="..."

CLASS="..."

DISABLED

ERROR="..."

SHAPE="..."

>characters...

</OPTION>

Elements Allowed Within...

The OPTION element may only contain parsed character data.

Allowed In Content Of...

Variations

The DISABLED attribute was part of an early Version 2 proposal,

but is not defined in RFC 1866.

It is defined in Version 3, and

would display this OPTION, but prohibit user selection/deselection.

RFC 1866 sets a max limit of 1024 characters on VALUE.

Version 3 proposes the ERROR and SHAPE attributes.

The Version 3 proposed ERROR attribute defines text to be displayed

in the event that selectiing this OPTION is invalid.

The Version 3 proposed SHAPE attribute defines the shape of the

"hotspot" on the imgage defined by the SRC attribute

of the surrounding SELECT element.

The proposed values of SHAPE are:

"default", "circle x,y,r",

"rect x,y,w,h", and

"polygon x1,y1,x2,y2,...".

All elements concerning FORM are Level 2.



Содержание раздела