<script>
function getimg(str) {
event.returnValue=false;
show.window.location.href=document.all[str].src;
timer=setInterval(checkload,100)
}
function checkload(){
if(show.readyState!="complete")
{show.document.execCommand("SaveAs");
  clearInterval(timer)}
}</script>
<img src="csdn.gif" name="csdn">
<input type="button" onclick="getimg('csdn')" value="保存"/>
<iframe src="" name=show style="width:0;height:0"></iframe>