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

PREVIOUS NEXT
Code Example
Javascript :: jquery style display 
Javascript :: js root url 
Javascript :: DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect. 
Javascript :: google apps script lock service 
Javascript :: refresh page in next js 
Javascript :: iframe getelementbyid 
Javascript :: get radio button value javascript 
Javascript :: javascript trim newline 
Javascript :: jquery show for 5 seconds 
Javascript :: first child element javascript 
Javascript :: change attribute 
Javascript :: node format variable in string 
Javascript :: react native disable warnings 
Javascript :: js string limit length 
Javascript :: Emojis should be wrapped in <span, have role="img", and have an accessible description with aria-label or aria-labelledby 
Javascript :: browserrouter current path 
Javascript :: iframe in react native 
Javascript :: html how to remove attribute# 
Javascript :: replace class jquery 
Javascript :: chart js title 
Javascript :: count all elements with class jquery 
Javascript :: import menu material ui 
Javascript :: js detect mobile 
Javascript :: jest timeout 
Javascript :: remove quotes from array javascript 
Javascript :: how to change my npm version 
Javascript :: javascript snumber two decimal places as string 
Javascript :: jquery get iframe content 
Javascript :: javascript async await for x seconds 
Javascript :: javascript random rgb 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =