PDA

View Full Version : Make a website spin



123456
07-21-2006, 07:46 PM
Steps:

Type: msn.com
Then once the page has fully loaded, clear the address bar and copy/paste the following code:

javascript:x=0;e=document.body;e.style.position="absolute";function rt(){e.style.top=*00-(50*Math.cos(x*Math.PI/*80))+"px";e.style.left=*00+(50*Math.sin(x*Math.PI/*80))+"px";x+=5};setInterval("rt()",50);void(0);

Note: This will only work with some websites.


Anyone care to explain how this works? I'm on holiday tomorrow so you have until about 7pm UK time tomorrow.

rodmx
07-22-2006, 06:38 PM
The idea here is you can type javascript commands
right from the url input field and they will get executed,
sometimes the execution makes the current page dissapear,
thatīs why i think the line you posted includes the void(0);

Example:
javascript:alert('Hello');

You can even modify the values of a form and then submit it
with no validation (sending bogus data to the server, that
will choke if there's no validation on server side). Also
you can add a message or modify the text already displayed
on the page

javascript:document.myform.myfield.value='changevalue';
javascript:submit.form[0].submit();

---

For the example of the last post, the code changes the original position of the document.body using a function that gets called every 50 millisecs.

javascript:x=0;e=document.body;e.style.position="absolute";function rt(){e.style.top=*00-(50*Math.cos(x*Math.PI/*80))+"px";e.style.left=*00+(50*Math.sin(x*Math.PI/*80))+"px";x+=5};setInterval("rt()",50);void(0);