The SELECT element indicates the contents will be a list of values. The values of this list are indicated by one or more OPTION elements. This is how a drop-down box is included on the form.
disabled |
|
Disables input for the field. |
|
multiple |
|
If included allows multiple selections to be set. |
|
name="text" |
|
The value "text" is a name to apply to the selection. This will be passed to the form routine (CGI, ASP, PHP or otherwise) with the form is submitted. |
|
onblur=JavaScript |
|
Javascript routine to be executed if the field losses the focus (is the field receiving input at the current time). |
|
onchange=JavaScript |
|
Javascript routine to be executed if the field changes. |
|
onfocus=JavaScript |
|
Javascript routine to be executed if the field gets the focus (is the field receiving input at the current time). |
|
size=n |
|
Number of lines to include in the selection. |
|
tabindex="n" |
|
Specifies the tabbing sequence of the field. Used to indicate how the tab will move between fields. |
|
<select name="On" size="1"> <option selected>Web Site</option> <option>Products</option> <option>Suggestion</option> <option>(Other)</option> </select> |
This example shows a simple select statement.
Unless otherwise noted, all photos and text is Copyright © Richard G Lowe, Jr.