js 控制图片另存为

<html>
<body>
<script type="text/javascript">

function Saveit(){
temp.document.execCommand("saveas")
}
</script>

<iframe id="temp" style="display:none"></iframe>
<img src="ddd.jpg" onClick="Saveit()">
<script>
temp.location="ddd.jpg" //在隐藏帧中加载图片</script>

 

</body>
</html>

posted @ 2011-01-13 17:10  commas  阅读(769)  评论(0编辑  收藏  举报