javascript - How to remove all values from a dropdown than selected value -
i have dropdown. want remove options dropdown.
data.record.categoryid data.record.categoryid
here got value (data.record.categoryid
) 3. want remove options other value 3 remove dropdown using jquery.
how can this? value of data.record.categoryid
change each time. want remove other options value of data.record.categoryid
try code
$("#your_dropdown_id").children().not(":selected").remove();
Comments
Post a Comment