2017년 10월 27일 금요일

[jQuery] How to add and remove 'disabled' attribute.


$('#btn').attr('disabled', '');
$('#btn').attr('disabled', 'true');
$('#btn').attr('disabled', 'false');
$('#btn').attr('disabled', 'disabled');

Those are the same.

$('#btn').removeAttr('disabled');

This is how you remove the attribute.

댓글 없음:

댓글 쓰기