Tesco fixed it.
Nice
but why does this happen?
Printable View
Tesco fixed it.
Nice
but why does this happen?
haha thats awsome lol
thanks for that
javascript != java.
-=-=-
We once toyed with the idea of screwing up someone else's start page in their browser with a script like that, as a practical joke, like.
Was gonna put the original page in a frame, or use it as the source for an object, and then stick that in a new page and add the script to it. Maybe calling it onload, with a bit of a delay so it looked normal first. Just never got around to it.
You can mess around a bit with the numbers in the equation and positioning, as well.
changes its position.Code:javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=1000; DI=document.getElementsByTagName("img"); DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+"px"; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++}setInterval('A()',50); void(0)
Makes them move in another pattern. etc.Code:javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.getElementsByTagName("img"); DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=(Math.sin(R*x1+i*x3+x3)*x4+x5)+"px"; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++}setInterval('A()',50); void(0)
JavaScript = client-side, executes in your browser
Java = server-side to generate dynamic HTML pages or for standalone apps.
Anyone coding web applications deal with Javascript to add interaction to the pages (AJAX, form validation etc...) whether they are coding in PHP, Java, Ruby etc...
Hope that's enlightening for a neophyte
I made my own version of one of these when bored in school a few months back.
Scroll to the top of the page.Code:javascript:amm=20;sta=2;vri=8;stH=40;saW=screen.availWidth;fiA="<img src='http://fish.sferris.net/f3.png' />";fiB="<img src='http://fish.sferris.net/f2.png' />";poA=new Array();poB=new Array();i=0;for(i=0;i<amm;i++){poA[i]=Math.round(Math.random()*saW);ff=document.createElement("div");ff.innerHTML=fiA;ff.id="fA"+i;ff.style.position='absolute';ff.style.left=poA[i]+"px";ff.style.top=(i*stH)+"px";document.body.appendChild(ff)}for(i=0;i<amm;i++){poB[i]=Math.round(Math.random()*saW);ff=document.createElement("div");ff.innerHTML=fiB;ff.id="fB"+i;ff.style.position='absolute';ff.style.left=poB[i]+"px";ff.style.top=((i*stH)+(stH/2))+"px";document.body.appendChild(ff)}function lFi(){for(i=0;i<amm;i++){poA[i]+=(Math.random()*vri)+sta;if(poA[i]>saW)poA[i]=-100;document.getElementById("fA"+i).style.left=poA[i]+"px"}for(i=0;i<amm;i++){poB[i]-=(Math.random()*vri)+sta;if(poB[i]<-100)poB[i]=saW;document.getElementById("fB"+i).style.left=poB[i]+"px"}}lf=setInterval("lFi()",25);void(0)
Cool parlor tricks.