How to remove all theoptions of a select box using jQuery
- Article
- Comment
How to remove all the options of a select box using jQuery. With the help of jQuery we need can remove all the options from Selectbox. The following code will help you to remove all the options in the list.
$('#element-id-or-class') .find ('option') .remove() .end();
And also you can delete elements one by one.
Here the code to delete one by one.
$('#mySelect') .find ('option') .remove();
You can try it.