Tuesday, April 3, 2012

5 Awesome And Cool Javascript Tricks

     Javascript is an object oriented scripting language.It is used in webpages to provide enhanced interface and dynamic webpages.It is mainly used as client-side scripting language.There are some cool javascript tricks that will blow your mind.You don’t need any programing knowledge to use these tricks.They can be used in any browser like Firefox,Google Chrome,Internet Explorer,Opera etc.Here 5 Awesome And Cool Javascript Tricks..

1.Play  Game On any Webpage
>Getting bored while surfing Internet..Lets play a game to refresh your mind.Open any website in your browser.Now copy and paste the following javascript code in your browser:




>Press Enter Key.Now you can see a Triangular icon on the Left-top corner of your browser.Rotate this icon with W,A,D and use Space-bar to fire.Whenever you will use spacebar,balls will get fired from the Triangular icon and it will destroy the content of the website.

2.Edit Any Webpage
>If you really want to impress someone with your hacking skills then this trick will surely help you.Well this is actually not any hacking just a simple javascript trick but the other person will surely believe you as a hacker.
>You have to only do is to run this javascript in your address bar of your web browser.
>This will not harm any of your’s and victim’s actual web pages.You can edit content of any website including facebook,myspace,twitter etc.
>Open any website of your choice (like facebook) in  browser (internet explorer,google chrome,firefox) and clear the address bar of the browser.
>Copy paste the following javascript code in the address bar of your browser

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

>Thats it.Now you can edit anything that is written on the page.

How this trick actually work?
>This is a javascript code on the the browser side.It is temporary and the changes will be gone once you refresh the webpage.
>The javascript code JavaScript:document.body.contentEditable=’true’; makes the website editable in your browser.
>The code document.designMode=’on’ tells the browser to turn the designmode on
>The code void 0 tells the browser not to show any error
>So, enjoy this funny trick to hack facebook

3.Open Infinite Alert Boxes
>By using this javascript code your browser will open infinite Alert boxes.

javascript:while(1){alert('Restart your browser to close this box!')}

>To stop this code you have to restart your browser.

4.Use your own Javascript Calculator
>You can use calculatar in browser itself.For this you have to edit the values in the javascript code.
E.g to calculate 4+5+6+7+(3*10) the javascript code will be

javascript: alert(4+5+6+7+(3*10));

>Paste thos code in the address bar and you will get the calculated result in an alertbox.

5.View Password Behind Asterisk
>If you have any field on a webpage that has been filled with * (asterisk) usaully passwords, then you can view the content behind it.
>Simply paste this code in Address bar and press enter.

javascript: var p=r(); function r(){var g=0;var x=false;var x=z(document.forms);g=g+1;var w=window.frames;for(var k=0;k < w.length;k++) {var x = ((x) || (z(w[k].document.forms)));g=g+1;}if (!x) alert('Password not found in ' + g + ' forms');}function z(f){var b=false;for(var i=0;i < f.length;i++) {var e=f[i].elements;for(var j=0;j < e.length;j++) {if (h(e[j])) {b=true}}}return b;}function h(ej){var s='';if (ej.type=='password'){s=ej.value;if (s!=''){prompt('Password found ', s)}else{alert('Password is blank')}return true;}}

Important Note:-These javascript codes doesn’t work in the latest version of Google Chrome Browser.

1 comment: