首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Ajax >

Jquery Ajax 返回值传送到前台

2012-08-27 
Jquery Ajax 返回值传递到前台var callbackMsg $.ajax({type:GET,url:%request.getContextPath()%/

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();}
?

?

?

热点排行