<script type="text/javascript"> function limitlength(obj, length){ var maxlength=length if (obj.value.length>maxlength) obj.value=obj.value.substring(0, maxlength) } </script> Enter text (max length is 20 characters): <form> <textarea onkeyup="return limitlength(this, 20)" style="width: 300px; height: 90px"></textarea> </form>
No comments:
Post a Comment