js提取页面的图片

来源:互联网 发布:excel标注重复数据 编辑:程序博客网 时间:2024/06/05 15:49
void(function(b){if(null!=b){var a=document,c=a.createElement('center');c.innerHTML='<style>#'+(c.id='t'+new Date/1)+'>img{max-width:none;position:static!important;display:block!important;padding:0!important;margin:1em 0 6px!important}</style>双击页面返回',c.style.cssText='padding:1em;position:fixed;top:0;right:0;bottom:0;left:0;font:15px/1 arial;overflow:auto;color:#cf0;background:rgba(0,0,0,.95);z-index:'+9e15;(b=(b=(b=b.replace(/^\D+|\D+$/g,'').split(/\D+/).map(function(t){return+t}))[1]?b:[b=b[0]||100,b]).filter.call(a.images,function(t){return t.width>=b[0]&&t.height>=b[1]&&t.src}))[0]?b.forEach(function(t){c.appendChild(t.cloneNode(0)),c.innerHTML+=t.width+' x '+t.height}):c.innerHTML+='<br><br>没有找到符合条件的图片';a=(b=a.body).style.cssText,b.appendChild(c).addEventListener('dblclick',function(){b.style.cssText=a,b.removeChild(c);return!1},!1),b.style.overflow='hidden'}}(prompt('请输入图片最小尺寸(左宽右高, 用任意非数字隔开):\n若只输入一个数字, 则宽高都将使用此数字.','100x100')));

谷歌下,在代码前加javascript:,谷歌下测试可以直接使用

原创粉丝点击