您不能使用AJAX来下载文件。
You can't use ajax to download files.
或者使用
- 在jQuery的AJAX的文件下载插件http://johnculviner.com/jquery-file-download-plugin-for-ajax-like-feature-rich-file-downloads/
- 或生成服务器端的文件中使用AJAX通过URL和
使用
了window.location =文件名
- Jquery ajax file download plugin http://johnculviner.com/jquery-file-download-plugin-for-ajax-like-feature-rich-file-downloads/
- or generate the file on server side pass the url using ajax and
use
window.location="fileName"