zoukankan      html  css  js  c++  java
  • 【神奇的代码】

    只要你在IE浏览器任意打开一个网站,然后在浏览器上输入如下代码神奇的代码,可随意修改复制页面内容!

     

    神奇的代码 1神奇的代码1

          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);

     

     

           把上面的代码复制、粘贴到任何页面的网址栏里面运行,你就发现页面上的图片会飞起来了!真的好神奇哟!对了,想停下来的话,就重新刷新一下页面。

     

     

    神奇的代码 2

    神奇的代码2

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

     

     

           在地址栏输入上面这一行代码,然后回车,就发现整个页面都可以随意编辑了。仅仅是一行很短的代码页面上的所有内容都可以修改了,就像在word中编辑一样。那些不让拷贝的网站可以被这招通杀了。恢复的话,就重新刷新一下页面。

     

     

     


     

     

    我看了以上代码,知道他是执行javascript,以 javascript: 字符开头 void(0) 字符结尾!

    知道原理,你也可以编写自己的代码!

     

    更多收藏

    javascript的好玩妙用

     

    打开个有图片的网站,然后把IE的地址栏替换成如下代码:

    图片特效1

    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);

     

    图片特效2

    javascript:i=y=0;z=v=10;m=document.all;l=m.length;for(;i<l;i++){ if(m(i).tagName=='A'){m(i).style.display='none'}}function g(){j=m(y);if(j.tagName=='A'){p=j.style;p.display='inline';p.position='absolute'; p.filter='progid:dXImageTransform.Microsoft.Matrix(sizingMethod=\'auto expand\')';n=j.filters.item(0);w=z*1.5;r=.05*((y%2)?z:-z);c=Math.cos(r);s=Math.sin(r);if(w<1){s=0;w=1;p.position='static';y++;z=v}n.M11=c*w; n.M12=-s*w;n.M21=s*w;n.M22=c*w;z--;}else{y++; z=v}}setInterval('g()',5);void(0);

     

    图片特效3

    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);

     

    图片特效4

    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);

     

    1. 显示网页中的所有图片  

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

     

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

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

     

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

     

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

     

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

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

     

    6. 用IE做简单计算

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

     

    7. 防钓鱼验证

    fishing,想必了解网络安全的DX都知道是什么,我就不班门弄斧了。某些钓鱼网站提供的URL和网页本身的URL是不一致的,你可以用下面的代码进行验证,当两个URL相差太大的时候,你就要稍加小心了!

     

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

     

     

    如下代码是解除禁止右键,禁止复制之类的功能!

    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

     

    你可以在百度 http://www.baidu.com 里试一下!

    你会发现隐藏表单

     

    <input type=hidden name=cl value=3>

    会显示出来!

  • 相关阅读:
    @SuppressWarnings("rawtypes") 是什么含义
    Oracle存在则更新,不存在则插入应用-merge
    word 2010中设置默认粘贴为 只保留文本粘贴【visio也适用于快捷键方式】
    List的remove()方法的三种正确打开方式
    纵表和横表的概念及其相互转换
    log4j.xml简单配置实现在控制台打印sql执行语句【加注释】
    NGUI例子Scroll View场景中item添加点击后自动滑到终点
    unity3d 日志捕捉
    Unity3D研究院之动态修改烘培贴图的大小&脚本烘培场景
    Unity3D研究之Prefab里面的Prefab关联问题
  • 原文地址:https://www.cnblogs.com/602147629/p/2014486.html
Copyright © 2011-2022 走看看