如何在数据表中显示空数据消息 [英] How to show empty data message in Datatables
本文介绍了如何在数据表中显示空数据消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设我有时从服务器获取空数据,我想在 DataTables 中显示 No Data found 消息?.这怎么可能?
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"
}
} );
从 Datatable 1.10 开始,您可以执行以下操作:
Since Datatable 1.10 you can do the following:
$('#example').DataTable( {
"language": {
"emptyTable": "My Custom Message On Empty Table"
}
} );
<小时>
对于表格的完整的可用数据表自定义消息,请查看以下链接参考/选项/语言
这篇关于如何在数据表中显示空数据消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文