简体   繁体   中英

The download link opens the link instead of downloading it

I used the code:

<a download href="https://web.stanford.edu/group/csp/cs21/htmlcheatsheet.pdf"> Download cheetsheat</a>

but i wasn't able to make the link download the PDF. It opens the PDF instead.

The attribute is "download" but it is not working

将下载属性设置为文件名:

<a download="htmlcheatsheet.pdf" href="https://web.stanford.edu/group/csp/cs21/htmlcheatsheet.pdf"> Download cheetsheat</a>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM