Wednesday, March 23, 2011

Some of the amazing javascript tricks !!!!

* JavaSript to Edit any Webpage!
javascript:document.body.contentEditable='true'; document.designMode='on'; void (0);

* Webpage Content Killer -Destroy any Webpage.
javascript:var%20s%20=%20document.createElement('script');s.type='text/javascript';document.body.appendChild(s);s.src='http://img.hacker9.com/hacker9/asteroids.min.js';void(0);

* The Javascript Calculator....
javascript: alert(34343+3434-222);

* Floating or Dancing Images in Webpage
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);

* Shake your Browser Window!
javascript:function Shw(n) {if (self.moveBy) {for (i = 35; i > 0; i--) {for (j = n; j > 0; j--) {self.moveBy(1,i);self.moveBy(i,0);self.moveBy(0,-i);self.moveBy(-i,0);} } }} Shw(6)

* Reveal Password Behind Asterisk(*****) Using Javascript
javascript: alert(document.getElementById('Passwd').value);

Note for beginners only :- To see the effect of these javascripts you should copy only the codes in green colour and paste in the clear address bar of your browser[ where you write www.tricksforfun.blogspot.com and all ] and press enter !!!!!! Enjoy....!