【发布时间】:2013-07-29 10:34:13
【问题描述】:
要下载文件,我正在使用 ajax。我有三种状态:
"Download file" - before you click on the link.
"File is downloading..." - while the file is downloading
"Download file" - if the file was generated successful
"Error while downloading file" - if there was any error while download the file.
我正在使用 JSP,jquery ajax。如何判断使用ajax下载文件出错或下载成功。
【问题讨论】:
-
下载文件到底如何?贴出你的代码!
-
浏览器还是那样做,为什么要第二次实现呢?
-
只需调用一个 servlet 将文件写入响应中