disable input field with 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// Disable #x
$( "#x" ).prop( "disabled", true );
// Enable #x
$( "#x" ).prop( "disabled", false );$('input').prop('disabled', false);
Also in JavaScript:
- elif exist in js?
- jquery get element by id
- sort array of numbers in array in javascript
- september
- full screen a div
- bootstrap validator password and confirm password
- javascript add to object
- javascript read input from terminal
- javascript calculate time
- javascript count elements in json object
- react native cover image in parent view
- get downloadable link to s3 bucket object js
- javascript search on docuemt for text on iframe
- how to set view engine in express
- return the value of a selected option in a drop-down list
- how to detect a section is visible in jquery
- web scraping node js puppeteer
- -d {followingjson} curl
- javascript get black or white text base on color
- create new vuejs project
- how to scroll to top of a page automatically using javascript
- vscode display zsh characters
- import img react in another file
- redirect javascript code