Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jquery disable all input form

//In older versions you could use attr. 
//As of jQuery 1.6 you should use prop instead:
$("#target :input").prop("disabled", true);

//To disable all form elements inside 'target'. See :input:
//Matches all input, textarea, select and button elements.

//If you only want the <input> elements:
$("#target input").prop("disabled", true);
Comment

disable input field with jquery

// Disable #x
$( "#x" ).prop( "disabled", true );
 
// Enable #x
$( "#x" ).prop( "disabled", false );
Comment

disable input field using jquery

//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

$( "#x" ).prop( "disabled", true );
 
// Enable #x
$( "#x" ).prop( "disabled", false );
Comment

jquery disable all forms

$("#myForm :input").prop("disabled", true);
Comment

PREVIOUS NEXT
Code Example
Javascript :: sleep in react 
Javascript :: how to sort string aray in ts 
Javascript :: how to remove modal-backdrop fade in jquery 
Javascript :: jquery datepicker no past dates 
Javascript :: javascript remove all whitespaces 
Javascript :: godot destroy node 
Javascript :: javascript code for year in html 
Javascript :: jquery get data attribute value 
Javascript :: uppercase string in js 
Javascript :: jquery open a new tab 
Javascript :: jquery radio button click event 
Javascript :: aws secret manager nodejs javascript 
Javascript :: filter array with unique objects javascript 
Javascript :: how to set name attribute in jquery 
Javascript :: js root url 
Javascript :: Hide a div on clicking outside it with jquery 
Javascript :: convert english number to bangla in javascript 
Javascript :: javascript convert seconds to minutes seconds 
Javascript :: select2 on change 
Javascript :: javascript today minus 1 day 
Javascript :: react index.js 
Javascript :: angular limit string length 
Javascript :: js check if date is today 
Javascript :: how to imporrt Browserrouter in react 
Javascript :: where to add "type": "module" in the package.json 
Javascript :: lowercase or uppercase all strings in array javascript 
Javascript :: check email regex js 
Javascript :: js code to generate random base64 code 
Javascript :: append li to ul javascript 
Javascript :: check undefined object javascript one liner set to emtpy 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =