Limit Textarea 2

Ilya Gerasimenko Jan 9, 2008

General

This script limits text input to 20 characters per line for a total of 10 lines. Numbers are adjustable. It also filters textarea input: replaces non-alphanumeric characters with spaces, removes extra spaces (multiple consecutive, leading and trailing) and blank lines. Final clean-up is performed onblur, when user clicks out of textarea.


Notes

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: limitTextarea2.js


Head

Paste this code into the HEAD section of your HTML document.


Body

Paste this code into the BODY section of your HTML document


Leave a Response

(0 comments)