jQuery.fn.maxlength=function(){$("textarea[maxlength]").keypress(function(d){var b=d.which;if(b>=33||b==13){var a=$(this).attr("maxlength");var c=this.value.length;if(c>=a){d.preventDefault()}}})};