Mover ventana |
Post Reply |
Author | |
Programador
Expert@ Joined: 09 Mayo 2009 Location: San Pedro Alc. Status: Offline Points: 54 |
Post Options
Thanks(0)
Posted: 09 Mayo 2009 at 4:17pm |
El siguiente JavaScript mueve una ventana a través de la pantalla:
<!-- PRIMER PASO: Colocar este javascript en la página mover01.htm -->
<SCRIPT LANGUAGE="JavaScript">
<!-- function makeAd() {
window.open("mover02.htm", "Mover", "width=468,innerWidth=468,height=80,innerHeight=80,left=0,top=0"); } // -->
</SCRIPT> <!-- SEGUNDO PASO: Colocar el botón que activa la ventan en la página mover01.htm -->
<form>
<p><input TYPE="button" VALUE="Mover Ventana" onClick="makeAd()"></p> </form> <!-- TERCER PASO: Colocar este javascript en la página mover02.htm -->
<script LANGUAGE="JavaScript">
<!-- function startAd() {
if (window.screen) { pos = 0; aw = screen.availWidth; window.moveTo(pos, 0); timerID = setInterval("moveAd()", 50); } } function moveAd() {
if (pos <= 0) inc = 5; if (pos + 468 + 10 + 5 > aw) inc = -5; pos += inc; window.moveTo(pos, 0); } window.onload = startAd;
// -->
</script> |
|
Sponsored Links | |
Post Reply | |
Tweet |
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You can vote in polls in this forum |