 
			
				02/06/2015, 09:19
			
			
			     |  
      |    |    |    Fecha de Ingreso: mayo-2015  
						Mensajes: 18
					  Antigüedad: 10 años, 5 meses Puntos: 0     |        |  
  |      Respuesta: Contar líneas en un textarea sin incluir lineas vacias        <script type="text/javascript"> 
function copypasteRaton() {   
setTimeout(mostrarFilas, 0); 
}   
function mostrarFilas() { 
var texto = document.getElementById("area").value; 
document.getElementById('lineas').value = texto.match(/(\r\n|\n|\r)[a-z0-9¿!\-\*]+/gi).length+1;   
}   
</script> 
</head>   
<body> 
<h1>Elementos repetidos..</h1> 
<textarea id="area" onkeyup="mostrarFilas()" onpaste="copypasteRaton()"></textarea> 
<input type="number" name="resultado" id="lineas" size="12" style="text-align: center" >           |