ajax获取集合中元素,JAVA中Ajax怎么获取集合并且遍历

慕村9548890

12345678910111213141516通过JSON方式返回数据,然后在success中遍历数据。操作json$.ajax({           type: 'post',           url: "maintain_findRoomByBuildingId.shtml",           cache: false,           data: {"buildingId":buildingId},           dataType: 'json',           success: function(data){               jQuery.each(data.roomList, function(i,item){                   alert(item.id+","+item.name);               });           },           error: function(){               return;           }       }); 

0

0