Page 1 of 1

Counting User Text

Posted: Wed May 24, 2006 12:24 am
by pgoroncy
What I am trying to do is have the user enter text into a form and then count the number of words in the text they have entered. I know this is probably simple to do, but I just haven't been able to figure it out.

Posted: Wed May 24, 2006 12:26 am
by neogeek

Code: Select all

<textarea onkeyup="window.status = 'Words: ' + value.split(' ').length;"></textarea>
Hope that helps.