function Count ( text, maxlength ,divdisplay )
{
if ( text.value.length > maxlength )
{
alert( maxlength + ' characters limit. \r Excessive data will be truncated.');
text.value = text.value.substring(0, maxlength);
text.focus();
}document.getElementById(divdisplay).innerHTML = text.value.length;
}
textarea id="txtaboutcorp" rows="5" cols="50" onkeypress="Count(this,10
,'divcounteraboutcorp')" onkeydown="Count(this,10,'divcounteraboutcorp')" onfocusout="Count(this,10,'divcounteraboutcorp')" style="border-style:solid;border-color:Black; border-width:thin;">
textarea
Official Google Webmaster Central Blog
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment