如何每1分钟更新一次代码?
$.getJSON('/stats/rest/service.php/network/status', function(result) {
$("#currentusers").text(result.users.val);
});
答案 0 :(得分:0)
setInterval(function () {
$.getJSON('/stats/rest/service.php/network/status', function(result) {
$("#currentusers").text(result.users.val);
});
}, (1000*60)*1 ); // change '1' to however many minutes