JS word count calculator


SUBMITTED BY: Guest

DATE: Aug. 24, 2012, 11:59 a.m.

FORMAT: JavaScript

SIZE: 757 Bytes

HITS: 1692

  1. <form method="POST">
  2. <table border="0" cellspacing="0" cellpadding="0">
  3. <tr>
  4. <td width="100%">
  5. <textarea rows="12" name="charcount" cols="60" wrap="virtual"></textarea>
  6. </td>
  7. </tr>
  8. <tr>
  9. <td width="100%"><div align="right"><p><input type="button" value="Calculate Characters"
  10. onClick="countit(this)"> <input type="text" name="displaycount" size="20"></p>
  11. <div align="center"><center>
  12. </center></div></div></td>
  13. </tr>
  14. </table>
  15. </form>
  16. <script language="JavaScript">
  17. function countit(what){
  18. formcontent=what.form.charcount.value
  19. what.form.displaycount.value=formcontent.length
  20. }
  21. </script>

comments powered by Disqus