< a>下载属性不再起作用 [英] <a> download attribute not working anymore

查看:63
本文介绍了< a>下载属性不再起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾经使用此代码下载资源:

I used to use this code to download resources:

<a href='http://example.com' download> Download </a>

example.com是另一个网站(跨源).

Where example.com is another website (cross origin).

但是这现在不起作用,我尝试使用Chrome-Opera-Mozilla甚至Internet Explorer,但是它不起作用.

But this is not working now , I tried Chrome - Opera - Mozilla and even Internet Explorer , But it's not working.

推荐答案

请参见 https://caniuse.com/#search = download (已知问题"标签)在其中显示:

See https://caniuse.com/#search=download ("Known Issues" Tab) where it says:

Firefox仅支持同源下载链接.

Firefox only supports same-origin download links.

Chrome 65及更高版本仅支持同源下载链接.

Chrome 65 and above only supports same-origin download links.

IE根本不支持下载属性

IE does not support the download-attribute at all

这篇关于&lt; a&gt;下载属性不再起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆