如何在下载文件时禁用pop [英] how to disable pop when download the file

查看:89
本文介绍了如何在下载文件时禁用pop的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在编写代码来下载特定路径的文件,但是当我点击下载按钮时它会弹出,我不想那样弹出,即打开,保存,取消弹出。



I am writing code for download the file for a particular path but it gives pop up when I click download button , i do not want to that pop up i.e. open ,save ,cancel pop up.

推荐答案

你无法避免它:它是一个浏览器功能(只有一些浏览器),旨在防止你的网站在他不知情的情况下将内容下载给用户。



即使尝试禁用它也可能被视为恶意活动,因为它试图绕过安全措施。当然不是一个非常有效的措施 - 而是一种安全措施。
You can't avoid it: it's a browser feature (and only some browsers) that is designed to prevent your site downloading stuff to the user without his knowledge.

Even trying to disable it would probably be seen as malicious activity since it is trying to bypass a security measure. Not a very effective measure, certainly - but a security measure.


这篇关于如何在下载文件时禁用pop的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆