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

如下所示:

$.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;

}

});

以上是 jquery ajax后台返回list,前台用jquery遍历list的实现 的全部内容, 来源链接: utcz.com/z/360018.html

回到顶部