ajaxSubmit 上传文件 提示下载json处理

1.将ajaxSubmit 的dataType设置为json,  即dataType:"json"

2.将响应头内容设置为text/html;charset=utf-8  即Struts2  Action中返回响应时设置如下

ServletActionContext.getResponse().setContentType("text/html; charset=utf-8");
ServletActionContext.getResponse().getWriter().write(json.toString());

原文地址:https://www.cnblogs.com/ZqNote/p/7198636.html