Ajeesh's Online Info Collection

Thursday, 26 May 2011

Some 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://ajeesh-online.blogspot.com/2011/05/....) 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:


Code:
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) 


Here Is the Most Interesting one:


Code:
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! - 


Next.


Code:
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.
Next.


Code:
javascript: back();

OR
Code:
javascript: forward();

These take you forward or back one page.
Next.

Ok this is a long one, so just copy & paste, NO EDITING:

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*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: