"Disable input if select option checked" Code Answer's

You're definitely familiar with the best coding language Html that developers use to develop their projects and they get all their queries like "Disable input if select option checked" answered properly. Developers are finding an appropriate answer about Disable input if select option checked related to the Html coding language. By visiting this online portal developers get answers concerning Html codes question like Disable input if select option checked. Enter your desired code related query in the search bar and get every piece of information about Html code related question on Disable input if select option checked. 

Disable input if select option checked

By Poor PolecatPoor Polecat on Oct 12, 2020
  <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

        }
  });

Add Comment

0

Disable input if select option checked

By Poor PolecatPoor Polecat on Oct 12, 2020
$(document).ready(function(){
  $("select.form-control").change(function(){
    $(".home").prop('disabled', $(this).val() == 'home-none');
  });
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<select class="form-control">
    <option value="home-none">-</option>
    <option value="home-select">Team</option>
</select>

<div class="form-group">
    <input class="form-control home" name="h-p1-fn" placeholder="First name" type="text"/>
</div>
<div class="form-group">
    <input class="form-control home" name="h-p1-ln" placeholder="Last name" type="text"/>
</div>

Add Comment

0

All those coders who are working on the Html based application and are stuck on Disable input if select option checked can get a collection of related answers to their query. Programmers need to enter their query on Disable input if select option checked related to Html code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about Disable input if select option checked for the programmers working on Html code while coding their module. Coders are also allowed to rectify already present answers of Disable input if select option checked while working on the Html language code. Developers can add up suggestions if they deem fit any other answer relating to "Disable input if select option checked". Visit this developer's friendly online web community, CodeProZone, and get your queries like Disable input if select option checked resolved professionally and stay updated to the latest Html updates. 

Html answers related to "Disable input if select option checked"

View All Html queries

Html queries related to "Disable input if select option checked"

Browse Other Code Languages

CodeProZone