我使用 jquery.filedownload 来创建需要时间的文件。
有取消/停止下载的方法/命令吗?
喜欢
var myDownload = $.fileDownload(myUrl, { ...
myDownload.stop();
<小时/>
<小时/>
对于交叉浏览,该插件使用 iframe 而不是 ajax。我搜索了一种在不更改插件的情况下取消下载的方法。相反,我将返回 iframe 并调用 stop。
最佳答案
您可以使用中止命令:
var request = $.ajax({ url...
});
//kill the request
request.abort();
关于jquery filedownload,准备时取消下载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18151789/