Velký počet oken létající po obrazovce (nedoporučujeme!) -
zdrojový kód
<html>
<head><title>Java Script ze stránky - www.jaknaweb.com</title>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
</head>
<body background="pozadi.jpg" text="#000000" link="#0000FF" vlink="#0000FF" alink="#0000FF" onload="flagRun = 1; playBall(); return true" onUnLoad="procreate()">
<SCRIPT language=Javascript>
<!--
var xOff = 5;
var yOff = 5;
var xPos = 400;
var yPos = -100;
var flagRun = 1;
function openWindow(url){
aWindow = window.open(url,"_blank", 'menubar=no, status=no, toolbar=no, resizable=no, width=90, height=60, titlebar=no, alwaysRaised=yes');
}
function procreate(){
openWindow('okna.htm');
openWindow('okna.htm');
openWindow('okna.htm');
openWindow('okna.htm');
openWindow('okna.htm');
openWindow('okna.htm');
openWindow('okna.htm');
openWindow('okna.htm');
openWindow('okna.htm');
openWindow('okna.htm');
openWindow('okna.htm');
openWindow('okna.htm');
openWindow('okna.htm');
openWindow('okna.htm');
}
function newXlt(){
xOff = Math.ceil( 0 - 6 * Math.random()) * 5 - 10 ;
window.focus()}
function newXrt(){
xOff = Math.ceil(7 * Math.random()) * 5 - 10 ;
}
function newYup(){
yOff = Math.ceil( 0 - 6 * Math.random()) * 5 - 10 ;
}
function newYdn(){
yOff = Math.ceil( 7 * Math.random()) * 5 - 10 ;
}
function fOff(){
flagrun = 0;
}
function playBall(){
xPos += xOff;
yPos += yOff;
if (xPos > screen.width-175){
newXlt();
}
if (xPos < 0){
newXrt();
}
if (yPos > screen.height-100){
newYup();
}
if (yPos < 0){
newYdn();
}
if (flagRun == 1){
window.moveTo(xPos,yPos);
setTimeout('playBall()',1);
}
}
//-->
</SCRIPT>
<form>
<input type="button" value="Zpět" onClick="history.go(-1)">
</form>
</body>
</html>