gpt4 book ai didi

html - 如何在 Firefox 中下载 docx 文件而不是加载文件

转载 作者:行者123 更新时间:2023-11-28 01:35:07 25 4
gpt4 key购买 nike

Firefox 尝试读取 docx 文件而不是下载它们:

<a href="app/files/resources/downloads/Sample_Revision_Sheet.docx"
target="_blank">
Sample_Revision_Sheet.docx
</a>

最佳答案

您可以使用 download HTML5 中引入的属性:

This attribute, if present, indicates that the author intends the hyperlink to be used for downloading a resource so that when the user clicks on the link they will be prompted to save it as a local file. If the attribute has a value, the value will be used as the pre-filled file name in the Save prompt that opens when the user clicks on the link.

<a href="app/files/resources/downloads/Sample_Revision_Sheet.docx"
download="Sample_Revision_Sheet.docx">
Sample_Revision_Sheet.docx
</a>

关于html - 如何在 Firefox 中下载 docx 文件而不是加载文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28719200/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com