title: How can I truncate the contents of a textarea using JavaScript?
body: <p>I have a text field, I am using onkeypress to check the length of the entered string. If it exceeds n number of characters it will return false and it will not accept any other character, But Here I am unable to remove the characters I don't want in thetext field. How can I remove the text here.</p>