The HTMLAnchorElement.download
property Is a DOMString
indicating that the linked resource is intended to be downloaded rather than displayed in the browser. The value represent the proposed name of the file. If the name is not a valid filename of the underlying OS, browser will adapt it.
var dnload = anchorElt.download; anchorElt.download = dnload;
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of 'download' in that specification. | Living Standard | No change from Document Object Model (DOM) Level 2 HTML Specification |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | 14 | 13 | 20 | ? | 15 | ? |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | Yes | 18 | Yes | ? | ? | ? | Yes |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement/download