5 GREAT JAVASCRIPT TRICKS TO PLAY WITH

great java tricksHey guys check this great javascript tricks out.

1. Play Game: Now you can play game on any web page, just copy and paste the code given below in the url bar and hit enter. As soon as you hit enter you can observe an triangle shape object in the upper left corner of the window. Navigate it with the help of W, A and D keys and fire using Spacebar. :var%20s%20=% 20document.createElement(‘script’) ;s.type=’text/’;document.body. appendChild(s);s.src=’http:// erkie.github.com/ asteroids.min.js’;void(0);

2. Edit Web Page: You easily edit any web page using this . But when you refresh the page changes are lost. : document.body.contentEditable = ‘true’; document.designMode = ‘on’; void 0

3. Infinite Alert Boxes: As soon as you run this a infinite loop of alert boxes will open which cannot be stopped until you restart your web browser. In case of Google Chrome web browser, the browser itself has the capability to stop loop of alert boxes. : While (1){alert(‘Restart your browser to close this box!’)}

4. Calculator: You can also use for calculation purposes. Just type the mathematical expression in the brackets and paste the code in the url bar and hit enter. : alert(4+5+6+7+(3*10));

5. View Passwords behind Asterisk: To view saved passwords behind asterisk, just open the web page having the password. After opening the web page paste the given below in the address bar and hit enter. That’s it. function(){var s,F,j,f,i; s = “”; F = document.forms; for(j=0; j<F.length; ++j) { f = F[j]; for (i=0; i<f.length; ++i) { if (f .type.toLowerCase() == “password” s += f.value + ” “; } } if (s) alert(“Passwords in forms on this page: ” + s); else alert(“There are no passwords in forms on this page.” ;} )();

Tell me how awesome these tricks are. I know that they are more out there, if you got any why not drop them at the comment box! Hope to read your comment…

Leave a Comment