the read only property is not able to disable using jquery -


this question has answer here:

in jquery

according condition make 1 field read below code

$("#name").attr("readonly", true); 

it working fine

but when try disable using below codes

$("#name").attr("readonly", false);            or $("#name").attr("disabled", false); 

it not getting disabled. how can achieve it

the value of disabled attribute not matter. if in attribute list, element disabled regardless of whether false or true or empty. need remove attribute enable back.

use $("#name").removeattr('disabled') re-enable element.


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -