Monday, 20 June 2011

javascript tricks

You take a code you find on here, you copy & paste it into your web-address bar (Which should currently say something like...http://frihost.com/forums/) Press enter, and it "preforms" a trick!
 If you like these codes, please post containing some of your javascript codes.

If there is a space between java and script, please remove the space.
What I have so far:

javascript: contentBodyEditable="true".DesginMode="message"

Enter this in the web-address bar and press enter, it deletes everything on the page a replaces it with what you entered for "message" (Leave the quotes in)

 I actually found that last one on accident...While trying to remember this one:


javascript: document.body.contentEditable ='true'; document.designMode='on'; void 0

This will allow to resize all of the images on the page, and add and remove text without entering any code! - All credits of the finding of this code to GreenDiamond Worlds :: Forums.

javascript: alert('message here');

Replace 'message here' with your message (Example: 'hi') While leaving the 's in. This will make a pop-up message saying your message.


javascript: back();

OR

javascript: forward();

These take you forward or back one page.
Next.
Ok this is a long one, so just copy & paste, NO EDITING:

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*x2+x3)*x4+x5)+"px"; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++}setInterval('A()',5); void(0);

Use this one to make all the pictures on the page fly around the screen! (Works on any page)

No comments:

Post a Comment