如何使用ajax&amp ;;每1秒检索一次php结果jQuery的

时间:2017-05-11 07:01:39

标签: php jquery html ajax

var manageMemberTable;

$(document).ready(function() {
setInterval( function () {
manageMemberTable = $("#manageMemberTable").DataTable({
    "ajax": "php_action/retrieve.php",
    "order": []
    });

manageMemberTable.ajax.load('php_action/retrieve.php')
}, 100);

enter image description here

您好,我想每1秒重新加载一次此数据表...请帮忙

1 个答案:

答案 0 :(得分:1)

您可以使用DataTable的Ajax Reload。

Datatable Ajax Reload

每秒加载表的示例代码是:

.list-view, .list-view:focused, .list-view:selected {
    -fx-control-inner-background: transparent;
    -fx-control-inner-background-alt: -fx-control-inner-background;
    -fx-background-color: transparent;
    -fx-padding: 0;
    -fx-fit-to-width: true;
    -fx-effect: null;
    -fx-selection-bar: transparent;
    -fx-selection-bar-non-focused: transparent;
}

.list-view .list-cell:filled:selected:focused, .list-view .list-cell:filled:selected {
    -fx-background-color: transparent;
    -fx-effect: null;
}

.list-view .list-cell:filled:hover {
    -fx-background-color: transparent;
    -fx-effect: null;
}

.email-view {
    -fx-background-color: -color-quinary;
    -fx-effect: dropshadow(three-pass-box, -color-text-inverted, 4, 0, 0, 1);
}

希望这有帮助!