jQuery2018. 6. 28. 19:17

$('.selector').on('keyup', function() {

if($(this).val().length > 50) {

alert("글자수는 50자로 이내로 제한됩니다.");

$(this).val($(this).val().substring(0, 50));

}

});


출처 : http://deuxism.tistory.com/12

Posted by cpu21