搜索
查看: 1654|回复: 2
打印 上一主题 下一主题

神奇的网页代码

[复制链接]
跳转到指定楼层
楼主
发表于 2014-11-22 21:14:19 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

用法:将他们放进浏览器运作就可以了。。

以下代码适用于IE内核浏览器,部分非IE内核可能不适用!!



令网页飞舞的代码

在地址栏运行以下任一代码,网页图片会旋转飞舞(速度可自行设置),刷新页面恢复正常

x4= y4= x5= y5=

(这几个代码设置速度数值小是慢动作,大就快)



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.images; 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; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0);




这个是慢动作


javascript:R=0; x1=.2; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; 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; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',50); void(0);



这个超速。。


javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=900; y4=200; x5=900; y5=800; DI=document.images; 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; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0);





网页编辑 (这个可以恶搞不少网页哈)

自恋一下==#

在地址栏输入以下代码可像word一样随意编辑该网页,刷新页面恢复正常


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




网页缩小0.5倍

javascript:void(s=document.body.style);void(z=s.getAttribute('zoom'));if(z){s.setAttribute('zoom',(parseInt(z)-50)+'%');}else s.setAttribute('zoom','50%')




网页放大1.5倍

javascript:void(s=document.body.style);void(z=s.getAttribute('zoom'));if(z){s.setAttribute('zoom',(parseInt(z)+50)+'%');}else s.setAttribute('zoom','150%')




网页解禁

以下代码可解除禁止右键,禁止复制之类的功能


javascript:document.oncontextmenu = '';document.onmousedown = '';document.ondragstart = ''; document.onselectstart = '';document.onselect = ''; document.oncopy = '';document.onbeforecopy = ''; document.onmousemove = ''; void 0




显示网页隐藏表单

以下代码可把隐藏的表单显示出来


javascript:for(i=0;i<document.all.length;i++){document.body.all.maxLength=2147483647;document.body.all.outerHTML =document.body.all.outerHTML.replace(/type=(radio)|(hidden)|(checkbox)/i,'type=text');}void 0




显示网页源代码

对于加密过的网页直接显示其加密前的源代码


javascript:s=document.documentElement.outerHTML;document.write('<body></body>');document.body.innerText=s




显示网页中所有图片(进图库找图时特方便)

javascript:Ai7Mg6P='';for%20(i7M1bQz=0;i7M1bQz<document.images.length;i7M1bQz++){Ai7Mg6P+='<img%20src='+document.images[i7M1bQz].src+'><br>'};if(Ai7Mg6P!=''){document.write('<center>'+Ai7Mg6P+'</center>');void(document.close())}else{alert('No%20images!')}




隐藏网页中所有图片(浏览广告很多的网站时把所有图片屏障掉,能节省不少流量)

javascript:for(jK6bvW=0;jK6bvW<document.images.length;jK6bvW++){void(document.images[jK6bvW].style.visibility='hidden')}




防钓鱼验证(这个就比较实用啦,在网上支付时最好用下)

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


javascript:alert(" 该网页真正的URL是:" + location.protocol + "//" + location.hostname + "/" + "\n" + "地址栏的URL是:" + location.href + "\n" + "\n如果这和你预期的地址有出入,说明这很可能是钓鱼网站,请小心访问!");




QQ临时对话

在地址栏运行以下代码,将*换成QQ号


tencent://Message/?Uin=*********&websiteName=q-zone.qq.com&Menu=yes




IE计算器 (这个鸡肋,我都不好意思发。。==#

在地址栏中输入“javascript:alert(1.2*50+50*3/10) ”,然后按下回车键,出现的是“1.2*50+50*3/10”的结果“75”


沙发
发表于 2015-1-2 16:06:16 | 只看该作者
         
板凳
发表于 2015-1-24 20:36:12 | 只看该作者
楼主十分正解,赞赞赞
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

广播台
特别关注
快速回复 返回顶部 返回列表