EasyUI form 在IE下总是提示下载内容

使用EasyUI form插件创建或编辑成功后返回json,在IE下总是提示下载内容,其他浏览器正常。

  • 1.修改: contentType 为text/html

  • 2.注解修改如下:

@RequestMapping(value = "/save", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")  
@ResponseBody 

改为

@RequestMapping(value = "/save", method = RequestMethod.POST, produces = "text/html;charset=UTF-8")  
@ResponseBody


  • 3.其他解决方法:

在IE9下,将json字符串用下面的格式返回给客户端

<body> 
<pre>{"message":"保存成功","data":null,"success":true}</pre> 
</body> 
发布了32 篇原创文章 · 获赞 13 · 访问量 7万+

猜你喜欢

转载自blog.csdn.net/my_flash/article/details/79347911