HTMLAnchorElement:download 属性
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2019.
HTMLAnchorElement.download
属性是一个字符串,表示链接的资源旨在被下载而非在浏览器中显示。如果该属性有值,则指定了在本地文件系统中标记资源时使用的默认文件名。如果名称在底层操作系统中不是有效的文件名,浏览器将会对其进行调整。
备注: 这个值可能不会被用于下载。这个值不能用来确定下载是否会发生。
值
一个字符串。
规范
Specification |
---|
HTML # dom-a-download |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
download |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.