Javascript Hacks

Here are some most commonly used javascript tricks and they are extremely useful sometimes.

1. Persistent Alert Box

This JavaScript is one of many where the function repeats itself within itself, so it never ends when you click "OK" on the alert box. Just type this in any browser and hit enter, replacing YOUR MESSAGE with the message you want to be displayed.

javascript:function MakWasHere() { alert("YOUR MESSAGE"); MakWasHere(); } MakWasHere();
2. A fluttering of popup windows - Works best in Internet Explorer!

Some versions of Firefox or Chrome will just open new tabs if not configured properly (You can change this setting in their Preferences), and thus making the easiest way to stop the trick by Alt + F4'ing. In IE, (especially versions before IE7), you're running a never-ending loop of popup windows.
Popup blockers will usually not suppress this command since the user is running it directly.
Run this from the address bar, replacing the URL with any URL you want:

javascript:function MakOpenIt() { window.open("http://www.mayanksmansion.tk/");
MakOpenIt();} MakOpenIt();



Enjoy...

Category: 0 comments

0 comments:

Post a Comment

Copyright ©

Creative Commons License
http://www.mayanksmansion.tk is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License

Protected by Copyscape Online Plagiarism Test

Copyright © 2011 Mayank Sharma. Powered by Blogger.