This is another article on JavaScript, can be implemented in the browser address bar too much effect, font magnification, display all pictures, display cookies and so on. But this article focuses on the "fun" above, when you are bored, may wish to play. The original text comes from Blogohblog.
1. Edit Web Page
Enter the following code in the Address bar to press ENTER, and all elements on the page can be edited, and you can move and resize the elements. If you just hate a website to vent, I suggest you use Netdisater.
The code is as follows:
Javascript:document.body.contenteditable= ' true '; Document.designmode= ' on '; void 0
This is the edited google.cn:
2, the Invincible Hot Wheels
Run the following code in the Address bar to make all the picture elements in the page circle one after another.
The best implementation of this effect is the image search:
Change the Code "IMG" into any page on the characters, you can make these characters do invincible Hot Wheels movement.
The code is as follows:
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.getelementsbytagname ("img"); 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"; Dis.top= (Math.Cos (r*y1+i*y2+y3) *y4+y5) + "px"}r++}setinterval (' A () ', 5); void (0);
3, dangling.
Not only you, but also browsers don't like this javascript so much. When you run this code in the Address bar, the browser quickly shakes. The code is as follows:
Javascript:function Flood (n) {if (Self.moveby) {for (i = M > 0;i--) {for (j = N; j > 0; j--) {SELF.MOVEB Y (1,i); Self.moveby (i,0); Self.moveby (0,-i); Self.moveby (-i,0); }}}flood (6); {var inp = "D-x!msagro na dah tsuj resworb rouy"; var outp = ""; for (i = 0; I <= inp.length i++) {outp =inp.charat (i) + outp;} alert (OUTP); Reverse
If this code is not valid, please set the ">" Change to ">", "&It;" Change to "<".
4. Calculator
Enter the following code in the Address bar to achieve a simple arithmetic:
Javascript:alert (34343+3434-222);
In fact, the code can continue to simplify, such as simplifying it:
javascript:34343+3434-222
5. Anti-phishing verification
Some phishing sites provide the URL and the URL of the page itself is inconsistent, you can use the following code to verify, when the two URLs are too big, you need to be a little careful:
Javascript:alert ("The actual URL Is:tt" + Location.protocol + "//" + Location.hostname + "/" + "nthe address URL Is:tt" + Location.href + "n" + "nIf the server names does not match, this may be a spoof.");
It's funny, isn't it?