Cita: function contador_text(){
var __permitido = 114 ;
var __texto_permitido = '' ;
var __texto = $("#texto").attr("value") ;
var __total = __permitido - __texto.length ;
var __array = new Array();
__array = __texto.split('');
for(i=0 ; i<__texto.length ; i++){
if( i <= __permitido){
__texto_permitido += __array[i] ;
}
}
$("#texto").html(__texto_permitido) ;
if(__total >= 0){
$("#faltantes").html(__total) ;
}
return false ;
}
es una funcion que desarrolle hace rato , requieres jquery