var theSelectList = $('theBigFatSelectList');
var myNewOption = new Option("My Option", "123");
theSelectList.selectedIndex =
InsertNewOption(myNewOption, theSelectList);
function InsertNewOption(newOption, selectElement)
{
var optsLen = selectElement.options.length;
selectElement.options[optsLen] = newOption;
return optsLen;
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment