November 19, 2009
Remove all select options with JavaScript
Category: JavaScript, Tags: JavaScript, khadlock at 1:23 pm
Here's a quick function to remove all select options using JavaScript.
function RemoveAllOptions(selector) { while(selector.hasChildNodes()) selector.removeChild(selector.childNodes[0]); }
One Response to “Remove all select options with JavaScript”
Leave a Reply

Social comments and analytics for this post…
This post was mentioned on Twitter by studiosedition: Remove all select options with JavaScript http://tinyurl.com/ygedslf…