get the value in Select all option.
2012-02-24 11:04:43| Category: HTML| Report | Font size Subscription
1://get all the option number
document.getElementById ('---'). options.length
2://Gets the ID value for each option
document.getElementById ('---'). Options[i].value
3://gets the text that each option displays on the page
document.getElementById ('---'). Options[i].text
4://Determines whether the option is selected
document.getElementById ('---'). options[i].selected = = True
5://set this option to selected
document.getElementById ('---'). options[i].selected = True
6://, remove all option
document.getElementById (dayselecttagname). options.length=0;
7. Regenerate option
To generate a new option object
The first false means that it is not selected by default
The second false indicates that only a single selection
var newoption=new Option (Newoptionvalue,newoptionvalue,false,false);
Add the newly generated option to the Select tab
document.getElementById (dayselecttagname). Options[i-1]=newoption;
Get the value in Select all option