如何通过 javascript 设置 content-disposition = attachment
?
How can I set content-disposition = attachment
via javascript?
基本上,我想在页面通过 Javascript 加载后,使用 Firefox 强制执行SaveAs"操作.
Basically, I would like to force a "SaveAs" operation after a page has loaded via Javascript, using Firefox.
我该怎么做?
Content-Disposition 是一个响应头,即.服务器必须返回它.您无法使用客户端 javascript 实现此目的.
Content-Disposition is a response header, ie. the server must return it. You can't achieve this with client-side javascript.
这篇关于如何通过 javascript 设置 content-disposition = 附件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!