日期:2014-05-16 浏览次数:20756 次
// struts2.0配置文件 <action name="serviceTopAction" class="com.tydic.csb.web.servicetop.action.ServiceTopAction" method="queryComsumer"> <result name="success" type="json"> <param name="root">traderList</param> </result> </action> // java 代码 public String queryComsumer(){ List<Map<Object,Object>> traderList = serviceTopService.queryServiceTraderMap(); return SUCCESS; } $.ajax({ url : '<%=path%>/servicetop/serviceTopAction.do',//后台处理程序 type : 'post', dataType : 'json', success : function(data){ $.each(data,function(key,value){ //console.info(data[key].TRADER_NAME); //console.log(value.CRT_DATE); $(value).each(function(){ console.log("/t" + value.CRT_DATE); }); }) },error : function(){}