jquery enable disable textbox
//jQuery 1.6+ use:
$("#inputID").prop('disabled', true); //disable
$("#inputID").prop('disabled', false); //enable
//jQuery 1.5 and below use:
$("#inputID").attr('disabled','disabled'); //disable
$("#inputID").removeAttr('disabled'); //enable $("#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");
}
});
});// Disable #x
$( "#x" ).prop( "disabled", true );
// Enable #x
$( "#x" ).prop( "disabled", false );
$('input').prop('disabled', false);$("input").prop('disabled', true);
$("input").prop('disabled', false);
Also in JavaScript:
- knex pagination plugin
- react hooks redux
- javascript http get request
- javascript oneline function
- call json api javascript
- javascript check if file exists on server
- how to check if something is array javascript
- pandas show column with regular expression
- randint js
- uuid react
- javascript seo url parameters
- Javascript pong game
- javascript title string
- javascript if else
- align left text in reactstrap
- FAILURE: Build failed with an exception react native android
- loading screen fivem js
- javascript new Regexp with flag
- jquery select plugin
- page slug vuejs
- get contents between tags javascript
- regex not something
- deploy angular app on google app engine
- w3schools angular