日期:2014-05-16 浏览次数:20705 次
jquery使用ajax时返回xml时: 前台的请求方法: vfunction dosubmit(packageId){ $.ajax({ type: "POST", url: "/yy/tt.jhtml", data: "Action=firm&id=2&name=tttt", success: function(msg){ $("#layer_msg").text($(msg).find("msg").text()); } }); } 后台返回如下: response.setContentType("text/xml; charset=UTF-8"); PrintWriter printWriter=response.getWriter(); printWriter.println("<response><msg>dfdfdfdfd</msg></response>"); printWriter.close();