datatables屏蔽警告弹窗
生活随笔
收集整理的這篇文章主要介紹了
datatables屏蔽警告弹窗
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
//不顯示任何錯(cuò)誤信息
$.fn.dataTable.ext.errMode = 'none';
//以下為發(fā)生錯(cuò)誤時(shí)的事件處理,如不處理,可不管。
$('#tableId').on( 'error.dt', function ( e, settings, techNote, message ){
//這里可以接管錯(cuò)誤處理,也可以不做任何處理
console.log( 'An error has been reported by DataTables: ', message );
}).DataTable();
errMode 有三個(gè)值可選:
- alert?(default) - Alert the error
- throw?- Throw a Javascript error
- none?- Do nothing (you would want to use this?error?in this case)
官方地址:https://datatables.net/reference/event/error
轉(zhuǎn)載于:https://www.cnblogs.com/minutes/p/11339253.html
總結(jié)
以上是生活随笔為你收集整理的datatables屏蔽警告弹窗的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: TJU1001
- 下一篇: Rocket - tilelink -