博客园 首页 联系 订阅 管理

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

  解决

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

      

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

      response.getWriter().write(result);