PDF下载完成后的jQuery检查 [英] jQuery check when PDF download is complete

查看:65
本文介绍了PDF下载完成后的jQuery检查的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个链接,点击后下载pdf文件。

I have a link which when clicked downloads a pdf file.

有没有办法使用jQuery来判断何时发生这种情况。基本上我希望链接从下载更改为请稍等。当下载完成后,它将更改为其他内容。

Is there a way using jQuery to tell when this has occurred. Basically I want the link to change from download to please wait. And when the download is complete it will change to something else.

主要原因是pdf是在服务器端生成的,可能需要10或20秒。

The main reason is the pdf is generated server side and can take 10 or 20 seconds.

推荐答案

没有办法检查这个;没有像 ondownloadready 这样的事件。

There is no way to check this; there is no event like ondownloadready.

但是有一些解决办法...检查这个问题

But there are some work-arounds... Check this question on stackoverflow.

这篇关于PDF下载完成后的jQuery检查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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