监听Tab切换
element.on('tab(demo)', function(data){
layer.tips('切换了 '+ data.index +':'+ this.innerHTML, this, {
tips: 1
});
});
执行一个 table 实例
table.render({
elem: '#demo'
,height: 420
,url: 'demo/table.do' ***
,title: '用户表'
,page: true ***
,toolbar: 'default' ***
,totalRow: true ***
,cols: [[ ***
{
type: 'checkbox', fixed: 'left'}
,{
field: 'id', title: 'ID', width:80, sort: true, fixed: 'left', totalRowText: '合计:'}
,{
field: 'username', title: '用户名', width:80}
,{
field: 'experience', title: '积分', width: 90, sort: true, totalRow: true}
,{
field: 'sex', title: '性别', width:80, sort: true