jQuery글자수제한1 [jQuery] 글자수제한 # 1 2 3 4 5 6 7 8 9 0자 /200자 Colored by Color Scripter cs # 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 $('#textBox').keyup(function (e) { let content = $(this).val(); // 글자수 세기 if (content.length == 0 || content == '') { $('.textCount').text('0자'); } else { $('.textCount').text(content.length + '자'); } // 글자수 제한 if (content.length > 200) { // 200자 부터는 타이핑 되지 않도록 $(this).val($(this).val().su.. 2017. 1. 11. 이전 1 다음