Ver Mensaje Individual
  #2 (permalink)  
Antiguo 04/08/2004, 05:08
Avatar de KarlanKas
KarlanKas
Moderador extraterrestre
 
Fecha de Ingreso: diciembre-2001
Ubicación: Madrid
Mensajes: 6.987
Antigüedad: 23 años, 3 meses
Puntos: 61
Prueba con esto:
Código HTML:
<html>
<head>
	<title>Untitled</title>
	<script language="JavaScript">
	var pepe;
	
	function dale(a){
		esto=document.getElementById("capa");
		este=parseInt(esto.style.height);
		if(este>=20 &&este<=500){
			cuanto=a*10;
			este+=cuanto;
			esto.style.height=este+"px";
		}
	else{
		esto.style.height=(este-cuanto)+"px"
		limpiar();
		}
	}
	function aumentar(cuanto){
		limpiar();
		pepe=setInterval("dale("+cuanto+")",50);
	}
	
	function limpiar(){
	clearInterval(pepe);
	}
	</script>
</head>

<body>
<div id="capa" 
style="border:solid 1px black;width:300px;height:20px;" 
onmouseover="aumentar(1)" 
onmouseout="aumentar(-1)">
</div>


</body>
</html> 
__________________
Cómo escribir

No hay pregunta tonta, sino tonto que quiere seguir en la ignorancia.