table.render({
elem: '#demo'
, height: ''
, url: '/getNews'//数据接口
, page: false //开启分页
, cols: [[ //表头
{ field: 'Id', title: '编号', width: '10%', sort: true, align: 'center' }
, { field: 'account', title: '用户名', width: '18%', align: 'center' }
, { field: 'password', title: '密码', width: '18%', align: 'center',toolbar:'#pass'}
, { field: 'sex', title: '性别', width: '18%', align: 'center' }
, { field: 'age', title: '年龄', width: '18%', align: 'center' }
, { title: '删除', width: '18%', toolbar: '#barDemo', align: 'center', event: 'click' }
]]
});
<script type="text/html" id="pass">*****</script>
效果如下: