Home  |  Latest News  |  Contribute  |  F.A.Q.  |  Account  |  Scripts | About
Search ASPNut:
 
ASP Reference
Server Variables
ASP Glossary
Related Sites

Free Components

HTML Reference
Web Colors
Entities
CSS Level 1
Encode/Decode
Glossary

Our Sponsors
ASP Nuke CMS
Free Auctions
PHP 5 Script
Funktastic Blog
ULost Directory
Team Task

 

 

 

 

 

 

 

 

 

 

 

 

<OPTION>

The OPTION element defines the individual choices a user has to pick from in a SELECT input control. Each option represents a unique choice and the user may select only one unless the MULTIPLE attribute is defined on the SELECT element.

For long lists of options, the OPTGROUP element may be used to group similar choices together.

Attributes

Attribute Description
ID Identifies this tag to reference in script (program code)
CLASS Define the class used to render this element (defined by a style sheet)
SELECTED Indicates that this choice should be selected by default (when the form is first loaded)
VALUE Defines a value which the choice represents. This value will be assigned to the form value when the user submits the form. If the value attribute is omitted, the value will match the label (which follows this element)
LABEL Alternative shorter version of the label that should be used by user agents as the label for the option.

Example

<FORM action="formtest.asp" method="post">
   <P>
   <SELECT multiple size="4" name="components">
      <OPTION selected value="Component_1_a">Component_1</OPTION>
      <OPTION selected value="Component_1_b">Component_2</OPTION>
      <OPTION>Component_3</OPTION>
      <OPTION>Component_4</OPTION>
      <OPTION>Component_5</OPTION>
      <OPTION>Component_6</OPTION>
      <OPTION>Component_7</OPTION>
   </SELECT>
   <INPUT type="submit" value="Send"><INPUT type="reset">
   </P>
</FORM>

Compatibility

HTML 4.01

Return to HTML Tag Reference Overview

Orvado Technologies

ASP Nuke CMS
Free Open Source
Content Manager
HomeFix Boards
Home Remodeling
Message Boards

Contact Us | Contribute | About | Site Map



"Success is how high you bounce when you hit bottom." - General George Patton

©2007 Orvado Technologies, All Rights Reserved
ASP Nut provides articles and reference documentation for Active Server Page developers.