Option
The
list items are added to the <SELECT>
element by inserting <OPTION></OPTION>
elements.
The
Option Element’s attributes are:
§SELECTED: When this attribute is present,
the option is selected when the document is initially loaded. It is an error for more than one
option to be selected.
§VALUE:
Specifies the value the variable named in the select element.
<HTML>
<HEAD></HEAD>
<BODY>
<h2><font
color=blue>What type of Computer do you have?</font><h2>
<FORM>
<SELECT
NAME="ComputerType" size=4>
<OPTION value="IBM" SELECTED>
IBM</OPTION>
<OPTION
value="INTEL"> INTEL</OPTION>
<OPTION value=" Apple">
Apple</OPTION>
<OPTION value="Compaq"> Compaq</OPTION>
</SELECT>
</FORM></BODY></HTML>
Output
Comments
Post a Comment