Return to Snippet

Revision: 50769
at September 2, 2011 00:30 by thiagotargino


Initial Code
function textCounter(field, countfield, maxlimit) {
	    if (field.value.length > maxlimit){
	    	field.value = field.value.substring(0, maxlimit);
		} else {
	    	countfield.value = maxlimit - field.value.length
		}
	}
	$('textarea').keydown(function(){
	   	textCounter(this.form.campo9,this.form.remLen,3000);
	});
	$('textarea').keyup(function(){
	    textCounter(this.form.campo9,this.form.remLen,3000);
	});

Initial URL

                                

Initial Description

                                

Initial Title
Limite de caracteres em textarea

Initial Tags

                                

Initial Language
JavaScript