Answers for "select disable option in select"

1

html select option disabled selected

<option selected disabled>Choose Tagging</option>
Posted by: Guest on March-02-2021
0

disable other options in select except the selected

$("#lbCountries").click(function () {
     $("#lbCountires option").each(function (index) {
        if ($(this).is(':selected')) {
            $(this).prop('disabled', false);
         }
         else {
            $(this).prop('disabled', true);
         }
      });
  });
Posted by: Guest on December-23-2020

Code answers related to "select disable option in select"

Browse Popular Code Answers by Language