Announcement :

Try our newly launched website www.Technicalbaba.com Token Number - 1techbaba1

Saturday, 28 September 2013

word counting tool with code



Word Counting tool :






Demo :



Words Count : 0

Code :





JavaScript Code : ( put it over html code )



<script type="text/javascript">
           function formSubmit()
{
document.getElementById("frm1").submit();
}
        function countWords(){
s = document.getElementById("inputString").value;
s = s.replace(/(^\s*)|(\s*$)/gi,"");
s = s.replace(/[ ]{2,}/gi," ");
s = s.replace(/\n /,"\n");
document.getElementById("wordcount").innerHTML ="Words Count : "+s.split(' ').length;
        document.getElementById("wc").value = s.split(' ').length;
    }
</script>


Html Code : ( put it after script )



<textarea name="verbal" onkeypress="countWords();" id="inputString" 

style="width:80%" rows="10" placeholder="Write Your Text"></textarea>
<br>
<i><p id="wordcount">Words Count : 0</p></i>


Any problem please comment here !!! Enjoy !


Share it Please

Unknown

He is a blogger/website designer and developer.he is founder of www.technicalbaba.com and also loves web programming.

0 comments:

Post a Comment

We welcome's you to post your comments here , Our editorial team will review and reply to your valuable comment.Thank you to connect with us.














1. HTC offers bloggers to write a post for us , you can use your links too.


2. HTC offers ad networks to publish their ads in very low cost.


Copyright @ 2013 Ability 2 Crack. Designed by Templateism | Re-designed By Shashank MIshra