此下載一張圖片的網址:http://www.clipartbest.com/cliparts/Kij/gGE/KijgGEgrT.png通過URL
這是我的網頁代碼:
<html>
<head><title>Some title</title>
<script>
function DownloadUrl(url)
{
// Download that url
}
</script>
<body>
<button onclick="DownloadUrl('http://www.clipartbest.com/cliparts/Kij/gGE/KijgGEgrT.png')">button</button>
</body>
</html>
我的網頁和圖片的URL頁面是不同的。
下載attibute https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download – epascarello
是什麼你在這裏問? – user3378165
@ user3378165感謝您的回覆,請閱讀標題 – techno01