ajax://action 中 HttpServletResponse response = ServletActionContext.getResponse(); response.setContentType("text/plain;charset=UTF-8"); try { response.getWriter().write("Hello"); } catch (IOException e) { e.printStackTrace(); } return null;
页面弹出“Hello”$.ajax({ type: "POST", url: "请求action路径", data: "提交参数", success: function(data){ alert(data);//返回数据date } });
ajax回调函数中如何获取action中的数据
最新推荐文章于 2021-08-05 16:53:31 发布