Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我希望用户单击视频文件的链接,然后打开一个对话框供他们保存到文件。我不希望浏览器打开 quicktime 或任何其他插件来处理视频。如何才能做到这一点?
您不能仅使用 JavaScript 来做到这一点。您的服务器应将Content-Disposition标头设置为attachment. 例如,在 php 中,您可以执行类似的操作header("Content-Disposition:attachment;");
Content-Disposition
attachment
header("Content-Disposition:attachment;");