解决ie浏览器时 easyui Form接收json数据时自动下载的问题

  原因EasyUI的Form提交是不能像$.ajax提交那样指定dataType,而EasyUI的Form默认解析格式是"text/plain"

  解决

    ①:返回值类型改为String,直接返回一个Json字符串

      

    ②:后台参数添加HttpServletResponse response,然后response.setContentType("text/plain"),返回类型改为void,

      response.getWriter().write(result);

      

    

    

猜你喜欢

转载自www.cnblogs.com/mfsqZzz/p/11088958.html