如何在Datatables中显示空数据消息 [英] How to show empty data message in Datatables
本文介绍了如何在Datatables中显示空数据消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
如果要自定义在空表上显示的消息,请使用以下命令:
$('#example')。dataTable({
oLanguage:{
sEmptyTable:我的空表上的自定义消息
}
});
自Datatable 1.10可以执行以下操作:
DataTable({
language:{
emptyTable:我的空表上的自定义消息
}
});
对于完整的可用数据表自定义消息表格请查看以下链接参考/选项/语言
Suppose i get empty data from server sometimes, i want to display No Data found message in DataTables?. How is this possible?
解决方案
If you want to customize the message that being shown on empty table use this:
$('#example').dataTable( {
"oLanguage": {
"sEmptyTable": "My Custom Message On Empty Table"
}
} );
Since Datatable 1.10 you can do the following:
$('#example').DataTable( {
"language": {
"emptyTable": "My Custom Message On Empty Table"
}
} );
For the complete availble datatables custom messages for the table take a look at the following link reference/option/language
这篇关于如何在Datatables中显示空数据消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文