Answers for "jquery css enabled textbox"

2

disable textbox jquery

$("#radiobutt input[type=radio]").each(function(i){
    $(this).click(function () {
        if(i==2) { //3rd radiobutton
            $("#textbox1").attr("disabled", "disabled"); 
            $("#checkbox1").attr("disabled", "disabled"); 
        }
        else {
            $("#textbox1").removeAttr("disabled"); 
            $("#checkbox1").removeAttr("disabled"); 
        }
      });

  });
Posted by: Guest on June-06-2020
3

disable input field with jquery

// Disable #x
$( "#x" ).prop( "disabled", true );
 
// Enable #x
$( "#x" ).prop( "disabled", false );
Posted by: Guest on September-11-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language