How can i dynamically remove all options of a drop down box in javascript?
Setting the length to 0 is probably the best way, but you can also do this:
length
var mySelect = document.getElementById("select"); var len = mySelect.length; for (var i = 0; i < len; i++) { mySelect.remove(0); }