<script type="text/javascript"> //Edit the counter/limiter value as your wish var count = "125"; //Example: var count = "175"; function limiter(){ var tex = document.myform.comment.value; var len = tex.length; if(len > count){ tex = tex.substring(0,count); document.myform.comment.value =tex; return false; } document.myform.limit.value = count-len; } </script> <form name="myform" METHOD=POST> <textarea name=comment wrap=physical rows=3 cols=40 onkeyup=limiter()></textarea><br> <script type="text/javascript"> document.write("<input type=text name=limit size=4 readonly value="+count+">"); </script> </form>