源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

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

  • 时间:2022-07-11 03:18 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:jquery ajax后台返回list,前台用jquery遍历list的实现
[b]如下所示:[/b]
$.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的实现全部内容了,希望大家多多支持编程素材网~
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部