How to capture the Keypress count
I have a textarea that limits the input to 300 characters. I want to capture the keypress count and show the user how many characters they used of the 300 ie "You have used 150 of 300 characters". I found some code to capture the keypress count, but don't know how to set the character count in a separate text input box. I tried to use the val function to set the value, but it takes only a string.
Thanks for any help.
Tom
$(document).ready(function()
{
$('#info').keypress(function()
{
//alert('Handler for .keypress() called.');
* set a text input field called CountDown here increasing with each keypress as in i++
});
});