Answers for "HOW TO DISABLE selecting in option box select html"

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 "HOW TO DISABLE selecting in option box select html"

Browse Popular Code Answers by Language