set text input readonly with jquery code example Example: add readonly attribute jquery $(input).attr('readonly', true);