效果图如下: JQUERY 代码: 代码如下: var text=$(“.release textarea”).val();//获取输入框的值 var counter=text.length; //获取输入框的值 $(“#numtj em”).text(500-counter); $(document).keyup(function() { var text=$(“.release textarea”).val(); var counter=text.length; $(“#numtj em”).text(500-counter); if(counter>500){ //如果字数大于500