Bind the below function to keypress event as below
txtJustification.Attributes.Add("onkeypress", "return limitText('" + txtJustification.ClientID + "', 3000);");
function limitText(limitField, limitNum)
{
var obj = document.getElementById(limitField);
if (obj.value.length > limitNum){return false;} else return true;
}
Hope this helps
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment