information4all ― Source Code For Counting Number of Words in A Text using Javascript. <div dir="ltr" style="text-align: left;" trbidi="on"> <form method="POST" name="Pru"> <script language="JavaScript"> function countit() { var formcontent=document.Pru.Prucount2.value var trimmed =formcontent.replace(/^s+|s+$/g, '') ; var str = trimmed.replace(/ +(?= )/g,''); trimmed=str.split(" ") document.Pru.Prucount3.value=trimmed.length } </script><br /> <table border="0" cellpadding=[...]
What would you say?
Be the first to comment on this blog post! Sign in or Create an account.