How To Set The Maxlength Of A Textarea So That It Works Across All Browsers?
I wrote the below maxLength restriction on the textarea control and it works fine in IE 9.0 but doesn't work with IE 8.0.
Solution 2:
It will not working below IE9.
Use this code it will work for below IE 9 version. only change version in if condtion.
if(navigator.appVersion.indexOf("MSIE .9")!=-1)
{
$('#inputid').bind('keyup blur', function () {
var $this = $(this);
var len = $this.val().length;
var maxlength = 3;
if (maxlength && len > maxlength) {
var inputvalue= $this.val().slice(0, maxlength);
$this.val("");
$this.val(inputvalue);
}
});
}
Post a Comment for "How To Set The Maxlength Of A Textarea So That It Works Across All Browsers?"