📜  jquery 实时通知 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:38.737000             🧑  作者: Mango

代码示例1
setInterval(function(){
  $.get("updates.php", {}, function(results){
    if ($(results).length) {
      $("results").each(function(){
        // do something with update messages
      });
    }
  });
}, 30000); // Every 30 seconds.