如何强制自动下载pdf? [英] How to force a pdf download automatically?
本文介绍了如何强制自动下载pdf?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有什么方法可以强制用户的下载管理器开始下载 .PDF 而不是在新窗口/选项卡中显示 .PDF?
Is there any way to force the user's download-manager to start a download for .PDF instead of showing the .PDF in a new window/tab?
推荐答案
use the download attribute inside your <a>
tag
<a href="content/file.doc" 下载 >文档链接
这篇关于如何强制自动下载pdf?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文