当前位置: 代码迷 >> Ajax >> Jquery Ajax 返回值传送到前台
  详细解决方案

Jquery Ajax 返回值传送到前台

热度:156   发布时间:2012-08-27 21:21:57.0
Jquery Ajax 返回值传递到前台
	var callbackMsg ;
	$.ajax({       
			type:"GET",
			url:'<%=request.getContextPath()%>/tagServletMaintain/'+msg+'?_method=getRelated',
			async :false,
			success:function(data){ 
				callbackMsg="已有 "+data+" 篇资讯使用选中的标签,是否继续删除?";
			}    
		  });

?后台JAVA代码?

?

?

public void renderGetRelated(RenderContext context, String ids)
			throws Exception {
		PrintWriter pwriter = this.getHttpServletResponse(context).getWriter();
		pwriter.print(tagService.getRelated(ids));
		pwriter.close();

	}
?

?

?

  相关解决方案