Remove all select options with JavaScript

Here’s a quick function to remove all select options using JavaScript.
function RemoveAllOptions(selector)
{
     while(selector.hasChildNodes()) selector.removeChild(selector.childNodes[0]);
}

Tags:

Comments Closed

Comments are closed.