Answers for "how to change readonly attribute in jquery"

2

jquery set attribute readonly

// jQuery < 1.9
$('#id').attr('readonly', true);

// jQuery >= 1.9
$('#id').prop('readonly', true);
Posted by: Guest on November-25-2020
0

add readonly attribute jquery

$('#inputId').attr('readonly', true);
Posted by: Guest on March-27-2022

Code answers related to "how to change readonly attribute in jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language