1
我要讓這樣如何創建一個鏈接「圖片另存爲」下載的圖片在Rails
http://idwallpaper.com/download.php?image_id=1517
的鏈接下載我從其他教程嘗試這樣
<script>
function SaveFile(fname){
img.document.execCommand('saveas', null ,fname)
}
</script>
<iframe id="img" src="myimage.jpg" width="(image width + 20)px" height="(image height + 25)px" scrolling="no" frameborder="0px"></iframe>
<button onclick="SaveFile('myimage.jpg');">save as</button>
無法在Firefox的工作,雖然.....