Difference between prop and attr in different version of jquery

rgqancy發表於2016-11-08

jQuery <1.9
$('#inputId').attr('readonly', true);

jQuery 1.9+
$('#inputId').prop('readonly', true);

Read more about difference between prop and attr

相關文章