全球主机交流论坛

标题: 精彩的Javascript代码收集 [打印本页]

作者: fesite    时间: 2014-9-17 08:24
标题: 精彩的Javascript代码收集
罗列出页面中的所有图片:
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')}

让网页中的图片飞舞的代码:
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.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);

这些代码怎么用?不用专门做什么网页,只要把它放在你打开的任何一个网站上面的地址栏里面运行就可以了。

来源:yoyo blog







欢迎光临 全球主机交流论坛 (http://bbs.cuwww.com/) Powered by Discuz! X3.2