Home / Free JavaScripts / Forms / Here
![]() |
Cut & Paste Max # of words check (Requires NS 3.x, 4.x, or IE 4.x)
|
Description: A script that checks the number of words in a form box, and if it exceeds the predetermined number, cancels the form submission, and asks the surfer to re-enter data. This script requires NS 3.x, 4.x, or IE 4.x to function-all other browsers will simply not participate in the word checking.
Example:
Directions: Simply cut and paste the below code into the <body> section of your page. It contains a form with one textarea box that is checked for max # of words. You can change this # from the default 10 to another by changing "var maxwords" below. You can add in more form elements into the form, as you would with any other form.
![]() |
. |
|