I have a few areas on my site where I need to limit text input to X amount of characters and it\'s nice to show a number of spaces left while a user types in, like twitter d
Very simple in jQuery:
Substitute the 200 by whatever your limit is.
Note this does not limit the actual text input, it just counts down. You need to check server-side for the input length, this is just a visual helper.
As an aside, I don't think you even should try to limit the input length by denying any input when the limit is reached. It's a pain in the rear usability-wise and can't be relied upon anyway. A simple countdown and server-side checking is the best option IMHO.