是用js 实现 图片“另存为” 最后怎样实现的? (FireFox没有测试过)

使用JS实现单击连接保存图片
2种形式都可以

第一种:
<script> 
function   SaveAs5(imgURL) 
...{ 
  var   oPop   =   window.open(imgURL,"","width=1,   height=1,   top=5000,   left=5000");   
  for(;   oPop.document.readyState   !=   "complete";   )   
  ...{ 
    if   (oPop.document.readyState   ==   "complete")break; 
  } 
  oPop.document.execCommand("SaveAs"); 
  oPop.close();   
} 
</script>
<img   src="t_screenshot_17616.jpg"   id="DemoImg"   border="0"   onclick="SaveAs5(this.src)"> 
第二种:
<script> 
function   SaveAs5(imgURL) 
...{ 
  var   oPop   =   window.open(imgURL,"","width=1,   height=1,   top=5000,   left=5000");   
  for(;   oPop.document.readyState   !=   "complete";   )   
  ...{ 
    if   (oPop.document.readyState   ==   "complete")break; 
  } 
  oPop.document.execCommand("SaveAs"); 
  oPop.close();   
} 
</script>
<img   src="../t_screenshot_17616.jpg"   id="DemoImg"   border="0"> 
<a   href="#"     onclick="SaveAs5(document.getElementById('DemoImg').src)"> 点击这里下载图片 </a>

25 thoughts on “是用js 实现 图片“另存为” 最后怎样实现的? (FireFox没有测试过)

  1. Pingback: air conditioner replacement knoxville tn

  2. Pingback: you can look here

  3. Pingback: xemtructiepbongda

  4. Pingback: i99 casino

  5. Pingback: ชุดไทย ผู้ชาย บุรีรัมย์

  6. Pingback: 바카라

  7. Pingback: cac nha cai uy tin

  8. Pingback: Your Fish Guide Tank Heaters

  9. Pingback: porn

  10. Pingback: https://library.kiu.ac.ug/

  11. Pingback: how to steal a bycicle

  12. Pingback: 바카라 사이트 무료 쿠폰

  13. Pingback: auto generated contents

  14. Pingback: seo

  15. Pingback: how to buy legit steroids online

  16. Pingback: natural skincare

  17. Pingback: sbobet

  18. Pingback: tylenol generic

  19. Pingback: seo prutser

  20. Pingback: 우리카지노

  21. Pingback: fake vacheron constantin noob for sale

  22. Pingback: uniccshop.bazar

  23. Pingback: วิธีหาเงิน

  24. Pingback: paito hongkong

  25. Pingback: kalpa pharma testosterone enanthate

Leave a Reply