打印本文 打印本文 关闭窗口 关闭窗口
右击鼠标弹出图片另存为对话框
作者:武汉SEO闵涛  文章来源:敏韬网  点击数819  更新时间:2009/4/23 11:27:43  文章录入:mintao  责任编辑:mintao

<script>
function getimg() {
event.returnValue=false;
show.window.location.href=event.srcElement.src;
timer=setInterval(checkload,100)
}
function checkload(){
if(show.readyState!="complete")
{show.document.execCommand("SaveAs");
  clearInterval(timer)}
}

</script>
<img src="xxx" oncontextmenu="getimg()">
<iframe src="" name=show style="width:0;height:0"></iframe>

利用一个框架保存图片,然后可以执行savaas命令

打印本文 打印本文 关闭窗口 关闭窗口