Select drop-down list
Property:
Options[]: Returns an array that contains all the options in the drop-down list.
SelectedIndex: Sets the index number of the selected item in the Return drop-down list.
Length: Returns the number of options in the drop-down list box. If set to 0, clears the list box.
Method:
Add (New,old): Adds an option. If old is empty, it is added to the end, and old has a value before it is added to old.
Event:
OnChange: The event that is called when the option is changed.
Option Object
Property:
Text: Sets or returns the literal value of an option.
Value: Sets the value of an option.
Example: Adding a week to the select list
<SelectID= "Week"></Select> <Scripttype= "Text/javascript"> varSelect=document.getElementById ("Week"); varweeks= NewArray ("Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"); for(varI=0; I<Weeks.length;i++) {Select.add (NewOption (Weeks[i],i+1)); }</Script>
Java Script Foundation (ix) drop-down list object