Here is a simple code for word counter tool for your blog.
Just paste the code on your on the page in html mode on your page
<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 align="center" border="2" cellpadding="2" cellspacing="2"><tbody>
<tr> <td width="100%"><textarea cols="70" style="color:blue" name="wordcount2" rows="20" wrap="virtual"></textarea></td> </tr>
<tr> <td width="100%"><div align="center">
<input onclick="countit()" type="button" value="Calculate Words" /> <input name="wordcount3" size="20" type="text" />
<div align="center">
<center>
<span style="font-family: verdana;">type your name here</span>
<span style="font-family: arial, helvetica;"><a href="#link">Written in JavaScript
</a></span></center>
</div>
</div>
</td> </tr>
</tbody></table>
</form>
You can customize the code or change attributes or design it on your own
No comments:
Post a Comment