Changes

Jump to: navigation, search

Building Forms with JavaScript

866 bytes added, 20:44, 16 May 2007
JavaScript Drop-down / Select Object
== JavaScript Drop-down / Select Object ==
 
The JavaScript Select object provides a drop down list of choices from which the user can choose (often referred to as ComboBoxes in other GUi environments). When the drop down list is not visible the current selection is displayed in a text area. Due to the fact that the Select Object supports both single and multiple selection of items in the list it is ideal for both "one of many" and "many of many" selection choices.
 
The Select Object uses the <select> tag together with <option> tags representing the choises to be displayed in the drop-down list:
 
<pre>
 
<select name="carBrands" size=10>
<option value="Ford" SELECTED>Ford Motor Company
<option value="GM">General Motors
<option value="Honda">Honda Motor Company
</select>
 
</pre>
 
The optional ''multiple'' attribute may be added tothe <select> tag to enable multiple selection of items from the list.
== JavaScript Password Object ==

Navigation menu