disable input selection code example

Example 1: html select option disabled selected

<option selected disabled>Choose Tagging</option>

Example 2: Disable input if select option checked

<select id="select">
      <option value="">select this </option>
      <option> 1 </option>
      <option> 2 </option>
      <option> 3 </option>
  </select>
   
  <input disabled type="text" id="p_amount">
  <input disabled type="text" id="pay_full">

$("#select").change(function(){
        if ($(this).val() !== "") {
         $("#p_amount").prop('disabled', false);
         $("#pay_full").prop('disabled', false);
         }
        else {
         $("#p_amount").prop('disabled', true);
         $("#pay_full").prop('disabled', true);
       
       //i means this value of select_option  is empty

        }
  });