input readonly jquery code example
Example 1: jquery make readonly textbox
$("#fieldName").prop("readonly", true);
Example 2: jquery set attribute readonly
// jQuery < 1.9
$('#id').attr('readonly', true);
// jQuery >= 1.9
$('#id').prop('readonly', true);
Example 3: add readonly attribute jquery
$(input).attr('readonly', true);