HTML <a> download link does not working

时间:2015-12-05 05:28:57

标签: html download

<img href='../img/image.jpg' download>Download</a>

I think i know the problem , may be using "../" cause the download does not work , but i have not idea for this. I am trying many kind of method to this, and also not working. Does it have any syntax can replace ../ ?

Someone have any experience for this?

It would help me in my assignment...

1 个答案:

答案 0 :(得分:0)

你需要用一个标签指定它,这样就像这样

<a href="path/to/image" download="Your Image Name"><img src="path/to/image" /></a>