Spread the word

Thursday, May 22, 2008

JavaScript Trick - Shaking browser window

Here is a trick that how you can shake the screen with JavaScript? JavaScript has many powerful functionalities that can be used to perform many interesting and unconventional ideas. Here is one funny thing that you can do with JavaScript. This is just for fun but a nice script to play with.



Just copy this script below and paste in your browsers address bar. Then hit enter and see what happens to your browser screen. You will enjoy it.

javascript:function flood(n) {if (self.moveBy) {for (i = 15; 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); } } }} flood(6);{ var inp = " moc.topsgolb.suoemca//:ptth tisiv erom roF ? siht dekiL "; var outp = ""; for (i = 0; i <= inp.length; i++) { outp = inp.charAt (i) + outp ; } alert(outp) ;}; reverse();

So now you have got a nice script to play with. Experiment on it tell me what else can you do with this nice scrap. This is a JavaScript for beginners to learn with. Hope you enjoy working with browsers windows in JavaScript like this.

0 comments:

Post a Comment