Friday, July 18, 2008

Deleting the listbox selected value through Javascript

Javascript:
function removeOptions(selectbox)
{
var i;
for(i=selectbox.options.length-1;i>=0;i--)
{
if(selectbox.options[i].selected)
selectbox.remove(i);
}
}

HTML:








No comments: