| The SELECT and OPTION Elements |
The SELECT element is used to create a list
of choices either as a drop down menu or as a list box. Each
of the choices in the list is an OPTION element. Adding one
or more OPTION elements within the select element creates
a selection list. Users can select only a single choice from
a drop down menu, but you can use the multiple attribute to
enable them to select a range of choices.
Syntax:
<SELECT [name=controlname] [size=controlwidth]
[multiple] [disabled] [tabindex=tabnum] [onfocus=script] [onblur=script]
[onchange=script] [core] [international] [events]> OPTION
elements</SELECT>
<OPTION [selected] [Disabled] [value=controlvalue] [core]
[international] [events] >text label
or value </OPTION>
Example:
<SELECT name= "delivery speed">
<OPTION>super fast, the kids are
revolting</OPTION>
<OPTION> Fast, I just woke up and
I am starving</OPTION>
<OPTION>Just make sure it's warm
when it gets here </OPTION> </SELECT>
In this exercise you will learn to create
a Drop-Down Menu in the FORM using the SELECT and OPTION elements.
The SELECT statement displays a drop-down
menu in which only the first value is displayed. The values
for selection are specified using the option statement.
The drop-down menu appears. Click the drop-down arrow to view the menu.


Copyrights : Layout Galaxy All Rights Reserved
No part of this tutorial may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, electrostatic, magnetic tape, mechanical or otherwise, without prior permission in writing from Layout Galaxy.
|
|
|