快速保存网页中所有图片—javascript

206 views

分类 : 技术文摘 | 发布时间 : 08-10-2005

快速保存网页中所有图片的方法
首先打开有图片的网页,完全打开后,在地址栏输入

<I>javascript</I>: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!’)}

回车 就可以罗列出页面中的所有图片

另外还有:不显示网页中图片的代码:

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

网页文字缩小0.5倍:

<I>javascript</I>: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倍:

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

你也许还想了解这些

Post a comment

无觅相关文章插件,快速提升流量