$("#field").attr('readonly','readonly');
To make an input readonly use: $("#fieldName"). attr('readonly','readonly');