codingtcher.com
Theme Night
Home
Login

jquery set attribute readonly

Home » Tutorial Post » jquery set attribute readonly
//jquery set attribute readonly
// jQuery < 1.9
$('#id').attr('readonly', true);

// jQuery >= 1.9
$('#id').prop('readonly', true);

//add readonly attribute jquery
$('#inputId').attr('readonly', true);

Related Post