Word Count
How many times have you had to launch an entire word processor just to find out the # of words a certain paragraph contains? Why not use this script instead? If you have a site that contains forms, you could also include this script on the page to spare your visitors the hassle you once had to go through!
<form method="POST" name="wordcount">
<script language="JavaScript">
function countit(){
var formcontent=document.wordcount.wordcount2.value
formcontent=formcontent.split(" ")
document.wordcount.wordcount3.value=formcontent.length
}
</script>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><textarea rows="12" name="wordcount2" cols="60" wrap="virtual"></textarea></td>
</tr>
<tr>
<td width="100%"><div align="right"><p><input type="button" value="Calculate Words"
onClick="countit()"> <input type="text" name="wordcount3" size="20"></p>
<div align="center"><center>
</center></div></div></td>
</tr>
</table>
</form>
Comments
Post a Comment