I want to clear a Select elements. I haven´t any proble with the options, but with the Optgroup I have a problem.
When the page loads, the select list fills with some values, that are grouped. The I have a button that change those values with it´s key, and then I refill the select with the new values. Here the Optgroup is repeated.... I don´t want to replace the select wqith a new elemnt, because I create this select at first time from a class with some characteristics and functions assigned.
So, how I can clear all the optgroup??