<script type="text/javascript">
function countChar(textareaName,spanName){
if($(textareaName).val().length<=200){
document.getElementById(spanName).innerHTML = 200 - document.getElementById(textareaName).value.length;
}else{
alert('不能在写喽~');
}
}
</script>
<textarea name="textarea" id="textarea" class="qinghud_sjap_tw_text" onkeydown='countChar("textarea","word");' onkeyup='countChar("textarea","word");' maxlength=200></textarea>
<div class="text-length"><span id="word">200</span>/<span >200</span></div>
<div class="text-length"><span id="word">200</span>/<span >200</span></div>
效果图: