码迷,mamicode.com
首页 > Web开发 > 详细

js循环加载数据列表

时间:2017-11-01 13:29:30      阅读:289      评论:0      收藏:0      [点我收藏+]

标签:info   win   inf   渲染   cti   列表   div   编号   uil   

js循环加载数据列表
//订单渲染
function buildShowInfoDiv(data){
  for(i in data.data){
    var bussNo = data.data[i].bussNo;
    var items=‘<div class="weui-cells" onclick="selectOneOrder(\‘‘+bussNo+‘\‘)">‘
    items+=‘<div class="weui-cell">‘
    items+=‘<div class="weui-cell__bd">‘
    items+=‘<p>提交订单时间</p>‘
    items+=‘</div>‘
    items+=‘<div class="weui-cell__ft">‘+data.data[i].submitTime+‘</div>‘
    items+=‘</div>‘
    items+=‘<div class="weui-cell">‘
    items+=‘<div class="weui-cell__bd">‘
    items+=‘<p>订单编号</p>‘
    items+=‘</div>‘
    items+=‘<div class="weui-cell__ft bussNo">‘+data.data[i].bussNo+‘</div>‘
    items+=‘</div>‘
    items+=‘<div class="weui-cell">‘
    items+=‘<div class="weui-cell__bd">‘
    items+=‘<p>借款人</p>‘
    items+=‘</div>‘
    items+=‘<div class="weui-cell__ft">‘+data.data[i].custName+‘</div>‘
    items+=‘</div>‘
    items+=‘<div class="weui-cell">‘
    items+=‘<div class="weui-cell__bd">‘
    items+=‘<p>订单状态</p>‘
    items+=‘</div>‘
    items+=‘<div class="weui-cell__ft">‘+data.data[i].status+‘</div>‘
    items+=‘</div>‘
    items+=‘</div>‘
  $("#orderdetails").append(items);
  }
}

js循环加载数据列表

标签:info   win   inf   渲染   cti   列表   div   编号   uil   

原文地址:http://www.cnblogs.com/smj1990/p/7765645.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!