¡@

Home 

2014/10/16 ¤W¤È 12:10:25

jquery Programming Glossary: wordcounts

jQuery: Count words in real time

http://stackoverflow.com/questions/7422192/jquery-count-words-in-real-time

variable and add the variables together to get your finalcount value. Or count the words in each input every time. var wordCounts function word_count field var number 0 var matches field .val .match b g if matches number matches.length 2 wordCounts field.. wordCounts function word_count field var number 0 var matches field .val .match b g if matches number matches.length 2 wordCounts field number var finalCount 0 .each wordCounts function k v finalCount v '#finalcount' .val finalCount Working demo http.. 0 var matches field .val .match b g if matches number matches.length 2 wordCounts field number var finalCount 0 .each wordCounts function k v finalCount v '#finalcount' .val finalCount Working demo http jsfiddle.net gilly3 YJVPZ Edit By the way you've..