Difference between prop and attr in different version of jquery

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

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

Read more about difference between prop and attr

posted @ 2016-11-08 14:44  任国强  阅读(235)  评论(0编辑  收藏  举报