jquery ajax后台返回list,前台用jquery遍历list

来源:互联网 发布:php 服务器框架 编辑:程序博客网 时间:2024/06/05 07:37
$.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;           }       });  


原创粉丝点击