当前位置: 首页 > 图文教程 > 网络编程 > Javascript > IE中直接运行显示当前网页中的图片 推荐

Javascript
form中限制文本字节数js代码
use jscript with List Proxy Server Information
use jscript List Installed Software
List Installed Software Features
List Information About the Binary Files Used by an Application
List the Codec Files on a Computer
List the UTC Time on a Computer
List Installed Hot Fixes
excel操作之Add Data to a Spreadsheet Cell
Add Formatted Data to a Spreadsheet
Apply an AutoFormat to an Excel Spreadsheet
JavaScript语法着色引擎(demo及打包文件下载)
类之Prototype.js学习
一款JavaScript压缩工具:X2JSCompactor
iis6+javascript Add an Extension File
jscript之Open an Excel Spreadsheet
jscript之Read an Excel Spreadsheet
jscript之List Excel Color Values
去除图像或链接黑眼圈的两种方法总结
Add a Formatted Table to a Word Document

Javascript 中的 IE中直接运行显示当前网页中的图片 推荐


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-12   浏览: 200 ::
收藏到网摘: n/a

jb51修正版
使用方法直接在已打开网页的IE地址栏中输入即可

1.显示网页中的所有图片
复制代码 代码如下:

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

2.显示网页中除图片的其他
复制代码 代码如下:

javascript:for(i=0;i<document.images.length;i++){void(document.images[i].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;