//////////////HTML
/////////////Jquery
<asp:TextBox runat="server" ID="txt_StrengthsPCI" CssClass="form-control" Rows="4"
TextMode="MultiLine"
Style="resize: none;" onkeypress="return
TextArea_MaxCount(this.id,'StrengthsPCI',100);"></asp:TextBox>
/////////////Jquery
function TextArea_MaxCount(txtid, divcnt,
maxLength) {
var length = $('[id$=' + txtid +
']').val().length;
var length = maxLength - length;
if (length > 0) {
$('#' + divcnt).text(length + ' Left');
}
else {
$('#' + divcnt).text(length + ' Left');
return false;
}
}
Thanks for sharing..
ReplyDelete