function maxlength()
{
var tb= document.getElementById('<%=txtproblem.ClientID %>').value;
var count=tb.length;
var value2=100-count;
if(count>100)
{
alert("Can't enter more that 100 characters of text");
document.getElementById('<%=txtproblem.ClientID %>').value = document.getElementById('<%=txtproblem.ClientID %>').value.substr(0, 100);//(document.getElementById('<%=txtproblem.ClientID %>').value.length - 1));
}
}

0 comments:
Post a Comment