/**
* ajax 后台响应前台
* @param response 顾名思义,,不用解释了吧
* @param as_Msg 需要返回的内容
*/
public static void writer(HttpServletResponse response, String as_Msg) {
String as_ContentType = "text/html";
String as_Charset = "UTF-8";
response.setContentType(as_ContentType + "; charset=" + as_Charset);
PrintWriter write = null;
try {
write = response.getWriter();
write.write(as_Msg);
write.flush();
} catch (IOException arg8) {
arg8.printStackTrace();
} finally {
if (write != null) {
write.close();
}
}
}
ajax 后台响应前台
最新推荐文章于 2024-09-10 12:45:26 发布