Saturday, October 23, 2010

Funny JavaScript tricks

Hi frnz.. Today i am gonna tell you some interesting and funny JavaScript tricks and hacks.. to work those codes all you got to do is just copy the code and paste it into your browser address bar and hit "enter".

Modify the page Data

you can edit any web page as you can and also you can save the edited pages to your computer.Here is the code copy it and paste it into address bar ..


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


Play with images

Here is a wonderful funny trick with this you can play with images in web page. Just copy paste this in any web page hit "enter" then all the images in that page starts rotating in circular fashion. Try it on page which contain more images.

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);

Calculator

If you don't want to use default calculator, if you want to try some thing different that your browser should do this bloody job for you try this..!


javascript: alert(34343+3434-222);

you can change the numbers in brackets and also you can do complex arithmetic calculations.

Find spoof web sites

There are times when you are not sure that the website that you are visiting is
authentic. Use this code whenever in doubt :-




javascript:alert("The actual URL is:\t\t" + location.protocol + "//" + location.hostname + "/" + "\nThe address URL is:\t\t" + location.href + "\n" + "\nIf the server names do not match, this may be a spoof.");

Share/Bookmark

No comments:

Post a Comment