Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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 :: text input placeholder color react native 
Javascript :: week days array in javascrpt 
Javascript :: datatables remove pagination 
Javascript :: jquery check if screen size 
Javascript :: open ilnk target js 
Javascript :: a href confirm javascript 
Javascript :: how to insatll react-router-dom 
Javascript :: jquery link cdn 
Javascript :: javascript got to url 
Javascript :: WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for jquery 
Javascript :: react native reset cache 
Javascript :: How To Use Media Query Using Jquery 
Javascript :: media query js 
Javascript :: javascript remove diacritics 
Javascript :: change src of iframe jquery 
Javascript :: Javascript measure function run time 
Javascript :: how to get clicked radio button value in jquery 
Javascript :: jquery-3.2.1.min.js download 
Javascript :: javacsript update text in span 
Javascript :: javascript refresh page every 30 seconds 
Javascript :: remove a class after 100 milliseconds jquery 
Javascript :: javascript for loop over dictionary 
Javascript :: moment format datetime postgresql 
Javascript :: swal is not defined 
Javascript :: fetch put request js 
Javascript :: javascript remove leading zeros from string 
Javascript :: jquery check if element has css display none 
Javascript :: express post body undefined 
Javascript :: react create app 
Javascript :: javascript regex french phone number 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =