如何用jQuery动态获取textarea中的字数

2025-02-27 18:11:34
推荐回答(1个)
回答1:

$('textarea').change(function (){
alert($(this).val().length);
});
只要值改变就打印他的 值的长度 。