<script language="javascript">
function checkWordCount(src){
//判断文本域大小
if(src.value.length>500){
alert("字数不能大于500字!");
return false;
}
return true;
}
</script>
<form name="frm1" method="post" action="">
<textarea name="shch" cols="80" rows="7" onKeyDown="return checkWordCount(this)"></textarea>
</form>