首页 > 其他 > 详细

一条数据中需要遍历多条数据,页面遍历方法

时间:2016-12-19 13:41:30      阅读:257      评论:0      收藏:0      [点我收藏+]

   使用的是jgrid表格,bootstrap页面

{name:‘listportDetect‘,index:‘listportDetect‘, width:50,editable: true,formatter: function (cellvalue, options, rowObject) {
var res = "";
if(rowObject.listportDetect){
for(x in rowObject.listportDetect){
if(rowObject.listportDetect[x].status == 1){
// res += "<p><button class=‘btn btn-xs btn-info‘>"+rowObject.listportDetect[x].port+"</button></p>"; //绿色,通
res += "<label title="+rowObject.listportDetect[x].port+‘&nbsp;:&nbsp;可达‘+" style=‘height:30px;width:150px;background:#90EE90;text-align:center;margin-top:10px;outline:none;color:#FFFFFF;border-width:0px;border-style:none;border-radius: 10px;‘>"+
"<p style=‘margin-top:4px;‘>"+rowObject.listportDetect[x].name+
"&nbsp;&nbsp;&nbsp;&nbsp;"+
"<a href=‘#modal-portTable‘ class=‘tooltip-success‘ data-rel=‘tooltip‘ data-toggle=‘modal‘ title=‘编辑‘ onclick=‘editOpenPortDetect(\""+rowObject.listportDetect[x].pkid+"\",\""+rowObject.listportDetect[x].port+"\",\""+rowObject.listportDetect[x].name+"\")‘>"+
"<span class=‘white‘>"+
"<i class=‘icon-edit-sign bigger-140‘>"+"</i>"+
"</span></a>"+
"&nbsp;&nbsp;"+
"<i title=‘删除‘ class=‘icon-remove-sign bigger-150‘ onclick=‘removePortDetect("+rowObject.listportDetect[x].pkid+")‘>"+
"</i></p></label>&nbsp;&nbsp;";

}
}
}
return res;
}},

 

一条数据中需要遍历多条数据,页面遍历方法

原文:http://www.cnblogs.com/chen-yun/p/6196798.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!