📜  数据表保持顺序和页面选择页面刷新 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:06.233000             🧑  作者: Mango

代码示例1
$('#offersTable').dataTable({
        "bStateSave": true,
        "fnStateSave": function (oSettings, oData) {
            localStorage.setItem('offersDataTables', JSON.stringify(oData));
        },
        "fnStateLoad": function (oSettings) {
            return JSON.parse(localStorage.getItem('offersDataTables'));
        }
    });