1. Count of all the list options in a given Select List
var cntSelect = $(‘#selectVal option’).length;
2. Count of all the list options that they have selected in a given Select List.
var cntSelected = $(‘#selectVal option:selected’).length;
3, Removing all the lists in the Select List.
$(‘#selectVal option’).remove();
4. Remove only the selected options in Select List
$(‘#selectVal option:selected’).remove();
More to come. If you have any questions, please let me know.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5