zoukankan      html  css  js  c++  java
  • 黑科技小代码

    一.神奇的JS代码

    在地址栏中输入任意网站,然后用javascript:{document.body.contentEditable='true'; document.designMode='on'; void 0}
    替换地址栏中域名,回车就可以在IE中重新布局当前网站。

    找一个有图片的网站,用

    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: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[i].maxLength=2147483647;document.body.all[i].outerHTML =document.body.all[i].outerHTML.replace(/type=(radio)|(hidden)|(checkbox)/i,'type=text');}void 0

    2.获知详细的URL信息

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

    将实际 URL 与地址栏中的 URL 进行比较。如果它们不相符,则该 Web 站点有可能是在谎报。在这种情况下,您可能需要关闭 Internet Explorer。

    3.用IE做简单计算

    在地址栏中输入“javascript:alert(1.2*50+50*3/10) ”,然后把IE的地址栏替换成如下代码:

    4.显示网页源代码(对于加密过的可以直接显示其加密前的源代码)

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

    5.网页放大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%')

    6.网页缩小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%')

    7. 显示网页中除图片的其他

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

    8.解除网页中的一些禁止功能 如复制/粘贴,右键等
    javascript:(function(e,f,w,d,b,i){for(i=0;i<e.length;)(t=e[i++],w[t]=d[t]=b[t]=f);})(['onmousedown','onmouseup','onmousemove','ondblclick','onclick','oncontextmenu','onmousewheel','onselectstart','oncopy','onkeydown','onkeypress','onkeyup'],new Function,window,document,document.body);

    9.屏幕晃动
    javascript: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

    10.网页射击游戏
    javascript:var%20s%20=%20document.createElement('script');s.type='text/javascript';document.body.appendChild(s);s.src='http://erkie.github.com/asteroids.min.js';void(0);
    这个游戏可以在任何网页里面玩,可以把图片和文字打掉,如图圈内三角形是发射器,加载右下角黑窗口后,按F开始游戏,方向键控制移动,空格键射击。

    11.显示当前网页的COOKIE
    javascript:alert(document.cookie)

    12.显示网页中所有图片

    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!')}

    Source Link: http://blog.csdn.net/sjrGCkym/article/details/78266232

  • 相关阅读:
    LeetCode--Divide Two Integers
    mysql多实例安装与ssl认证
    ajax请求
    mysql5.6升级及mysql无密码登录
    mysql5.7密码设置
    BusyBox 添加 自定义命令小程序 (applet)
    分享9个常用的国外英文论文文献数据库
    arm linux 移植 gdb/gdbserver
    使用 mtd-utils 烧写Arm Linux 系统各个部分
    YUV图解 (YUV444, YUV422, YUV420, YV12, NV12, NV21)
  • 原文地址:https://www.cnblogs.com/coder211/p/7919838.html
Copyright © 2011-2022 走看看