Character Counter
This box will hold 200 characters.
Characters Used: Characters Remaining:

Copy All Of The Code Below, Green In Color


To change the count total, change the 200 blue, two places to what you want it to show.

<table align=center border=0 cellpadding=0 cellspacing=2 style="font-family:arial"><tr><td colspan=2 align=center> This box will hold <span id=charlimit >200</span> characters.</td></tr> <tr><td colspan=2 align=center> <textarea id=inputbox style="width:415; height:105; overflow:auto" onchange="showcount()" onkeyup="showcount()" onmouseup="showcount()" ></textarea></td></tr> <tr><td align=left>Characters Used: <span id=charcount></span></td> <td align=right>Characters Remaining: <span id=charleft></span></td></tr> </table> <script language=javascript> var textlimit=parseInt(document.getElementById('charlimit').innerHTML); showcount(); function showcount(){ var currentcount=document.getElementById('inputbox').value.length; if (currentcount>textlimit){ document.getElementById('inputbox').value= document.getElementById('inputbox').value.substr(0,textlimit)} else{ document.getElementById('charcount').innerHTML=currentcount+""; document.getElementById('charleft').innerHTML=(textlimit-currentcount) } } //-- text box limit of 200 can be changed in one place in the text above; </script>

More Tips


webpik banner

www.webpik.com




Copyright © 1998-2006bulls2.com All Rights Reserved

...