Home } Forms } Limit Textarea



This script controls a maximum textarea input amount and updates a small counter with how many characters are left with each keystroke. Dynamic fix now allows you to use this script in multiple textboxes on a page. Easy!
( You may enter up to 125 characters. )

characters left

The JavaScript Source: Forms: Limit Textarea

Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Apple-s). The script is yours!!!

    

Did you use this script?  Do you like this site?  Please link to us!

Add a comment, suggestion, or correction
[For questions about usage, consult the Notes tab above or visit the JavaScript forum. Do not include more than two (2) lines of code in your comments. If you have suggestions or corrections, you can submit them to us.]

    
   
       
[optional]
 
[optional]

   

Comments feed Comment Feed RSS 2.0

1. From: Mikko Torniainen
possible loss of info
12/10/2008 09:13:15

Well it's a good enough script, but could be better. It could prevent writing when the textarea is full instead of trimmin the content. If you type something in the middle of the text and then trim the end of the text is trimmed off which is not desired.

Sign up for the JavaScript Weekly

internet.com Privacy Policy
We'll send this script to you!

(just click "Send it!" once!)

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs