how to add readonly attribute to textbox in jquery code example Example: add readonly attribute jquery $(input).attr('readonly', true);