Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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 :: pass data navigate react router dom 
Javascript :: js when you leave 
Javascript :: mouseover javascript 
Javascript :: pad js 
Javascript :: how to take a input video on browser using javascript and play it 
Javascript :: javascript not empty array not string 
Javascript :: class constructor 
Javascript :: js load multiple images 
Javascript :: Clear Cell Value In Google Sheet By App Scripts 
Javascript :: get previous route 
Javascript :: nl2br in jquery 
Javascript :: createdAt expires mongoose 
Javascript :: javascript last element of array 
Javascript :: javascript display max amount of characters 
Javascript :: link vs uselink in React Router 
Javascript :: jquery remove keypress event 
Javascript :: set stroke color canvas 
Javascript :: how to get back image and front text in react native 
Javascript :: get a href value javascript 
Javascript :: javascript sleep function 
Javascript :: react native open link in browser 
Javascript :: add id to html element javascript 
Javascript :: javascript select all elements 
Javascript :: back button js 
Javascript :: nodemailer custom font 
Javascript :: remove console log in production react 
Javascript :: nghide angular 10 
Javascript :: how do i remove all vowels from a string in javascript and return the result 
Javascript :: call function in javascript from html 
Javascript :: add leading zeros javascript 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =