[Code]-Html
<form method="POST">
<textarea class="textarea-style" name="charcount"></textarea>
<div class="clear"></div>
<input onclick="countit(this)" type="button" value="Calculate Characters number" /> <input name="displaycount" size="20" type="text" />
<div class="clear"></div>
<div class="javascript-ex">
This free script provided by
<a href="http://w3onlinesource.blogspot.com/">w3onlinesource.blogspot.com</a></div>
</form>
<textarea class="textarea-style" name="charcount"></textarea>
<div class="clear"></div>
<input onclick="countit(this)" type="button" value="Calculate Characters number" /> <input name="displaycount" size="20" type="text" />
<div class="clear"></div>
<div class="javascript-ex">
This free script provided by
<a href="http://w3onlinesource.blogspot.com/">w3onlinesource.blogspot.com</a></div>
</form>
[Code]-Javascript
<script language="JavaScript">
function countit(what){
//w3onlinesource.blogspot.com
formcontent=what.form.charcount.value
what.form.displaycount.value=formcontent.length
}
</script>
function countit(what){
//w3onlinesource.blogspot.com
formcontent=what.form.charcount.value
what.form.displaycount.value=formcontent.length
}
</script>
[Code]-CSS
<style type="text/css">
.textarea-style
{
height: 200px;
width: 350px;
word-wrap: break-word;
padding:5px 5px 5px 5px;
margin:5px 5px 5px 5px;"
}
.javascript-ex
{
margin:10px 5px 5px 5px 5px;
text-align:left;
}
</style>
.textarea-style
{
height: 200px;
width: 350px;
word-wrap: break-word;
padding:5px 5px 5px 5px;
margin:5px 5px 5px 5px;"
}
.javascript-ex
{
margin:10px 5px 5px 5px 5px;
text-align:left;
}
</style>
No comments:
Post a Comment