Do you remember those funny one line JavaScript codes, that temporarily enable you to destroy web pages in your browser? Let me remind you of some of those. I have made a quick list of five JavaScript one-liners (which are appearing slightly big due to line-wrapping here) that can be used to have fun with your web browser.

Note: Try the below scripts on your own risk. As far as I know, these are not at all harmful. However, I will not be responsible for any damage.

Try these funny scripts just by copying and pasting in your browser’s address bar. Try demo links, in case the scripts are not working in your browser’s address bar.

5 Funny JavaScript Codes for your Web browser

1. Edit any Web page with the below Script:

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

Demo »

2. Know how images on a website looks when they move like a wave:

javascript:R=0;x1=.1;y1=.05;x2=.25;y2=.24;x3=1.6;y3=.24;x4=300;y4=200;x5=300;y5=200;var DI=document.images;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";*y1+i*y2+y3)*y4+y5+"px"}R++}tag=setInterval('A()',5);document.onmousedown=function(){clearInterval(tag);for(i=0; i<DIL;i++){DI[i].style.position="static";}};void(0);

Demo »

For those who are using Internet Explorer, wave 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.images;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;*y1+ i*y2+y3)* y4+y5;} R++;}setInterval('A()',5);void(0);

Demo »

3. Experience a Browser Quake for a while:

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

Demo »

4. See how much annoying your browser could be: (this one is really annoying, you might need to open Task Manager to end it)


Demo »

5. Image Enhancements:


Demo »

I hope you enjoyed the scripts. Do share with us, if you have more cool scripts. Also see useful JavaScript snippets for your Website.