Ver Mensaje Individual
  #2 (permalink)  
Antiguo 25/11/2009, 11:22
bebo
 
Fecha de Ingreso: octubre-2009
Mensajes: 97
Antigüedad: 14 años, 6 meses
Puntos: 4
Respuesta: Extender textarea

Prueba con este codigo:

Código html:
Ver original
  1. <textarea rows=1 onkeyup="agrandar()" name="texto"></textarea>
  2.  
  3. function agrandar(){
  4. area=texto.value;
  5. lineas=area.split("\n");
  6. for(i in lineas){
  7. var ubound=i;
  8. }
  9. ubound=new Number(ubound)+1;
  10. texto.rows=ubound;
  11. }