bootstrap table复杂操作代码
本文实例为大家分享了bootstrap table复杂操作,如何 生成外层表格,如何填充表格内容,供大家参考,具体内容如下1、先生成外层表格: },{
title: '讲义',colspan: 3,align: 'center'
},{
title: '视频',{
title: '总完成情况',align: 'center'
}
],[
] ] }); 2、生成展开之后的表格内容:');
html.push('
');
html.push(' ');
handoutColums.push({
field: 'handoutIndex',title: '编号',width: 150
},{
field: 'handoutName',title: '讲义名称',{
field: 'degree',title: '完成度',width: 150
});
videoColums.push({
field: 'videoIndex',{
field: 'videoName',title: '视频名称',width: 150
});
$.each(row,function (key,value) {
if(key=="handout"){
$.each(value,function(index,handout){
var row = {};
row['handoutIndex'] = index+1;
row['handoutName']=handout.handoutName;
row['degree']=handout.degree;
handoutData.push(row);
}); return html.join(''); 3、填充表格内容:function initHandoutTable(colums,data,index){
$('#tableHandout'+index).bootstrapTable('destroy').bootstrapTable({ } function initVideoTable(colums,index){ $('#tableVideo'+index).bootstrapTable('destroy').bootstrapTable({ } 如果大家还想深入学习,可以点击进行学习,再为大家附两个精彩的专题: 以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持编程之家。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |