问题
I downloaded this Modernizr snippet http://modernizr.com/download/#-a_download (found under Non-core detects) and added it in the <head>
.
My html markup looks like this:
<a href="test.jpg" download="test.jpg">Download file</a>
In Firefox and Chrome, download
attribute is supported even without using Modernizr.
Modernizr's a-download
is not supported by IE, Safari and Opera? Has anyone tried this before and got this working some other way?
来源:https://stackoverflow.com/questions/18681644/modernizr-a-download-for-download-attribute-does-not-work-in-ie-safari-and-and