方法:$('textarea').on('keypress', function(){ var _length = $(this).val().length; console.log(_length);});