This script will calculate how many words are in your string. Do not use double spaces because those count as one word.
<script type="text/javascript"><!--
// ***************
// Javascript Word Count
// More JavaScript Scripts at
// http://icecaves.net/tags/javascript
// ***************
var string = "Put your text here. Javascript will calculate how many words are in your string.";
var total = string.split(" ").length;
document.write("String: " +string+ "<br>Word Count: " +total);
//-->
</script>Code Preview:
Forum Board:
