function tablehs() {
tabhs = table.render({
elem: '#ta1currentTablehs',
id: 'ta1currentTablehs',
url: 'orderComplaint/uploadlist',
height: 300,
autoSort: false,//禁用前端自动排序,否则会与数据库返回的数据顺序不一致
contentType: 'application/json',
cellMinWidth: 80,
method: 'POST',
cols: [
[
{field: '序号', width: 80, title: '序号', align: 'center', type: 'numbers'},
{field: 'dataDate', width: 180, title: '数据时间', align: 'center'},
{field: 'fileName', title: '文件名称', align: 'center'}
]
],done:function(res){
tdTitle();
},
limits: [10, 15, 20],
page: true,
});
}
//给列表文字添加title
function tdTitle(){
$('th').each(function(index,element){
$(element).attr('title',$(element).text());
});
$('td').each(function(index,element){
$(element).attr('title',$(element).text());
});
};