Javascripts > Javascript Windows > Moving Window
Script Title: Moving Window
Description: It lets a window move, bouncing against the sides of the screen.
Example: Available
Copy the following code into your <HEAD></HEAD> tags.<script> /* Script from Java-scripts.net http://www.java-scripts.net Created by Marcel Wenting alias Liledevil, liledevil@hotmail.com */ <!-- // var mx=5 var my=5 function movewindow(){ if (self.screenLeft + document.body.clientWidth > screen.width) mx=-5 if (self.screenLeft < 0) mx=5 if (self.screenTop + document.body.clientHeight> screen.Height - 20) my=-5 if (self.screenTop < 0) my=5 window.moveBy(mx, my) setTimeout("movewindow()",100) // movewindow() } --> </script> </HEAD>
Copy the following code INTO your <BODY> tag.<BODY onload="movewindow();">
Enter your name and email address to have this script sent right to your Inbox for later viewing. First Name Last Name Email