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

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -