5个有趣的浏览器地址栏JavaScript代码(转载)

尘中客 posted @ 2010年8月10日 22:21 in 转载 , 1335 阅读

1、编辑网页

在地址栏输入下面的代码按enter,网页上所有元素都能变成可编辑状态,你可以移动、调整元素大小。

代码如下:

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

这是经我重新编辑的google.cn:

2、无敌风火轮

在地址栏运行下面的代码可使页面上所有图片元素一个接一个地转圈。

这种效果最好的实现地方就是图片搜索了:

改变代码里的“img”成任何网页上有的字符,可以使这些字符做无敌风火轮运动。

代码如下:

: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、晃来晃去

不但是你,浏览器也不是那么喜欢这个。在地址栏运行这个代码后,浏览器会迅速地晃来晃去。代码如下:

:function flood(n) {if (self.moveBy) {for (i = 200; 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 = "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

如果这个代码无效,请将">"改成">","&It;'改成"<"。

4、计算器

在地址栏输入下面的代码,可以实现简单的四则运算:

: alert(34343+3434-222);

事实上这个代码可以继续简化,比如简化成这样:

: 34343+3434-222

5、防钓鱼验证

某些钓鱼网站提供的URL和网页本身的URL是不一致的,你可以用下面的代码进行验证,当两个URL相差太大的时候,你就要稍加小心了:

:alert("The actual URL is:tt" + location.protocol + "//" + location.hostname + "/" + "nThe address URL is:tt" + location.href + "n" + "nIf the server names do not match, this may be a spoof.");

很有趣,不是吗?
转载请注明:转自K.I.S.S. - 简单哲学 - 5 个有趣的浏览器地址栏JavaScript代码(转载)
Avatar_small
전설 서구 说:
2021年2月28日 15:17

Your blog has chock-a-block of useful information. I liked your blog's content as well as its look. In my opinion, this is a perfect blog in all aspects. <a href="https://gogoanime.bar/">go go anime</a>

Avatar_small
전설 서구 说:
2021年2月28日 15:18

Your blog has chock-a-block of useful information. I liked your blog's content as well as its look. In my opinion, this is a perfect blog in all aspects. go go anime

Avatar_small
Assam HSLC English Q 说:
2022年9月28日 01:47 Board of Secondary Education, Assam is known as SEBA is conducted the English subject examination tests along with all examination tests for all government and private schools General curriculum and vocational course students as Unit Tests, Term, three months (Quarterly), Assam HSLC English Question Paper six months (Half Yearly), Pre-Final and annual final public examination tests to the academic year of 2023.
Avatar_small
토토사이트 说:
2024年3月20日 10:29

I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here!

Avatar_small
토토사이트 说:
2024年3月20日 10:29

I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here!

Avatar_small
카지노쿠폰 说:
2024年3月20日 10:31

 I just tripped upon your blog and wanted to say that I have really enjoyed reading your blog stations. Thanks for sharing. It can be easily remembered by the people. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. It can be easily remembered by the people.

Avatar_small
토토시대 说:
2024年3月20日 11:09

 Thank you very much and will look for more postings from you. I feel strongly that love and read more on this topic. If possible, such as gain knowledge, would you mind updating your blog with additional information? It is very useful for me.

Avatar_small
토토24 说:
2024年3月20日 11:10

Your blogs further more each else volume is so entertaining further serviceable It appoints me befall retreat encore. I will instantly grab your rss feed to stay informed of any updates.

Avatar_small
먹튀365 说:
2024年3月20日 11:10

I must say, as a lot as I enjoyed reading what you had to say, I couldnt help but lose interest after a while. Its as if you had a good grasp to the subject matter, but you forgot to include your readers. Perhaps you should think about this from far more than one angle. Or maybe you shouldnt generalise so considerably. Its better if you think about what others may have to say instead of just heading for a gut reaction to the subject. Think about adjusting your own thought process and giving others who may read this the benefit of the doubt.

Avatar_small
먹튀사이트조회 说:
2024年3月20日 11:49

Your blogs further more each else volume is so entertaining further serviceable It appoints me befall retreat encore. I will instantly grab your rss feed to stay informed of any updates.

Avatar_small
안전놀이터모음 说:
2024年3月20日 11:50

They also need to be good communicators, as they will often need to explain their ideas to clients and contractors. In addition, interior designers should have a good understanding of how different materials and finishes can impact a space. 

Avatar_small
먹튀검증업체 说:
2024年3月20日 11:51

Thanks a lot for enjoying this beauty article with me. I am appreciating it very much! Looking forward to another great article. Good luck to the author! 

Avatar_small
먹튀검증커뮤니티 说:
2024年3月20日 11:52

Thank you spending some time to talk about the following, I’m boldy a lot and even true love studying more to do with now this topic. However, if future, when you realize know-how, do you ever thoughts bringing up-

Avatar_small
스포츠토토사이트 说:
2024年3月20日 11:55

I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here!

Avatar_small
먹튀폴리스보증업체 说:
2024年3月20日 11:55

Love to read it,Waiting For More new Update and I Already Read your Recent Post its Great Thanks.

Avatar_small
온라인카지노추천 说:
2024年3月20日 11:57

Thanks for the Evoy link. What he says makes sense to me: blogging is an ancillary or supplemental tool, not the primary method, of making money online. Everyone reading this post should click on the Evoy link Elizabeth provided in comment #1 above.

Avatar_small
메이저토토사이트 说:
2024年3月20日 11:57

This is my first time I visit here. I found so many engaging stuff in your blog, particularly its conversation. From the huge loads of remarks on your articles, I surmise I am by all account not the only one having all the recreation here! Keep doing awesome. 

Avatar_small
토토사이트 说:
2024年3月20日 11:58

I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here!

Avatar_small
안전놀이터 说:
2024年3月20日 13:17

 I just tripped upon your blog and wanted to say that I have really enjoyed reading your blog stations. Thanks for sharing. It can be easily remembered by the people. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. It can be easily remembered by the people.

Avatar_small
ok토토먹튀검증 说:
2024年3月20日 13:17

I had attempt to advance your own article in to delicius all things considered it’s anything but a predicament utilizing your data destinations would you be able to please reverify the thought. much appreciated again

Avatar_small
안전놀이터추천 说:
2024年3月20日 13:57

This is my first time I visit here. I found so many engaging stuff in your blog, particularly its conversation. From the huge loads of remarks on your articles, I surmise I am by all account not the only one having all the recreation here! Keep doing awesome. 

Avatar_small
메이저사이트 说:
2024年3月20日 13:58

I must say, as a lot as I enjoyed reading what you had to say, I couldnt help but lose interest after a while. Its as if you had a good grasp to the subject matter, but you forgot to include your readers. Perhaps you should think about this from far more than one angle. Or maybe you shouldnt generalise so considerably. Its better if you think about what others may have to say instead of just heading for a gut reaction to the subject. Think about adjusting your own thought process and giving others who may read this the benefit of the doubt.

Avatar_small
007카지노 说:
2024年3月20日 13:58

Your blogs further more each else volume is so entertaining further serviceable It appoints me befall retreat encore. I will instantly grab your rss feed to stay informed of any updates.

Avatar_small
토토마트 说:
2024年3月20日 14:16

Thank you again for all the knowledge you distribute,Good post. I was very interested in the article, it's quite inspiring I should admit. I like visiting you site since I always come across interesting articles like this one.Great Job, I greatly appreciate that.Do Keep sharing! Regards,

Avatar_small
메이저토토 说:
2024年3月20日 14:17

One present why galore businesses opt for postcards is because they are overmuch cheaper to be prefab and this can forbear a lot of expenses on the lengthened run. 

Avatar_small
토토사이트 说:
2024年3月20日 14:19

Love to read it,Waiting For More new Update and I Already Read your Recent Post its Great Thanks.

Avatar_small
안전토토사이트 说:
2024年3月20日 14:50

This article was written by a real thinking writer without a doubt. I agree many of the with the solid points made by the writer. I’ll be back day in and day for further new updates.

Avatar_small
먹튀검증사이트 说:
2024年3月20日 14:50

Good website! I truly love how it is easy on my eyes it is. I am wondering how I might be notified whenever a new post has been made. I have subscribed to your RSS which may do the trick?

Avatar_small
메이저사이트 说:
2024年3月20日 15:28

This unique in fact perhaps even a very good arrange that i believe it or not in fact really enjoyed looking into. It is not necessarily consequently routine that i range from the substitute for verify a precise detail.

Avatar_small
토토디펜드 说:
2024年3月20日 15:29

The next time I learn a weblog, I hope that it doesnt disappoint me as much as this one. I imply, I do know it was my choice to learn, however I actually thought youd have something attention-grabbing to say. All I hear is a bunch of whining about something that you could possibly fix should you werent too busy looking for attention.

Avatar_small
안전놀이터 说:
2024年3月20日 15:30

Hmm… As i fully grasp weblogs having a linked problem, all the same as i do not ended pictures web page. As i added in from the piece that can help populars moreover i’ll quite possibly possibly be people specific primer.

Avatar_small
먹튀검증 说:
2024年3月20日 15:57

This article was written by a real thinking writer without a doubt. I agree many of the with the solid points made by the writer. I’ll be back day in and day for further new updates.

Avatar_small
먹튀신고 说:
2024年3月20日 15:59

I believe the most important thing is to put passion in whatever you do. If you write a blog just to make a few bucks and you don’t add passion in the mix, it won’t last very long.

Avatar_small
안전카지노사이트 说:
2024年3月20日 18:16

Behind every enchanting moment is a meticulous planning process orchestrated by Purnima. From the choice of settings to the smallest details, her commitment to perfection ensures that each encounter surpasses expectations. It's not just companionship; it's a symphony of carefully orchestrated elements that culminate in an unforgettable experience.

Avatar_small
온라인카지노 说:
2024年3月20日 18:17

This unique in fact perhaps even a very good arrange that i believe it or not in fact really enjoyed looking into. It is not necessarily consequently routine that i range from the substitute for verify a precise detail.

Avatar_small
토토사이트 说:
2024年3月20日 18:28

One present why galore businesses opt for postcards is because they are overmuch cheaper to be prefab and this can forbear a lot of expenses on the lengthened run. 

Avatar_small
เว็บไซท์ แทงบอลออนไล 说:
2024年3月20日 18:42

Love to read it,Waiting For More new Update and I Already Read your Recent Post its Great Thanks.

Avatar_small
먹튀검증 说:
2024年3月20日 18:53

One present why galore businesses opt for postcards is because they are overmuch cheaper to be prefab and this can forbear a lot of expenses on the lengthened run. 


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter