Ver Mensaje Individual
  #28 (permalink)  
Antiguo 05/05/2003, 12:48
Avatar de Carlitos
Carlitos
Usuario no validado
 
Fecha de Ingreso: mayo-2001
Ubicación: Zaragoza
Mensajes: 1.304
Antigüedad: 23 años
Puntos: 25
Bueno, probado y funcionando en Internet Explorer 5, Netscape 7 y Opera 7.

<script>
var anima
function abajo()
{
pixel=parseInt(document.getElementById("contenido" ).style.top);
if (pixel<0)
{
document.getElementById("contenido").style.top = pixel + 5
anima = setTimeout("abajo()",50)
}
}
function arriba()
{
pixel=parseInt(document.getElementById("contenido" ).style.top);
altura=parseInt(document.getElementById("contenido ").style.height)
if (pixel>-altura)
{
document.getElementById("contenido").style.top = pixel - 5
anima = setTimeout("arriba()",50)
}
}

function para()
{
clearTimeout(anima)
}

</script>

<body scroll=no>
<div id="cursor" style="position:absolute; left:10px; top:10px; width:40px; height:100px">
<a href="#" onmouseover="arriba()" onmouseout="para()">arriba</a>
<br>
<a href="#" onmouseover="abajo()" onmouseout="para()">abajo</a>
</div>
<div id="contenido" style="position:absolute; left:50px; top:0px; width:700x; height:1000px; z-index:1">

Aquí<br>
el<br>
contenido<br>
de<br>
la<br>
página.<br>

</div>
</body>