1. 定时循环执行代码

window.setInterval(function() {
                $.get("service.aspx?method=unreadmessage", function(data) {
                    if (data != "0")
                        $('#unreadCount').html(data).show();
                    else
                        $('#unreadCount').hide();

                });
            }, 1000);

可以类似这样写。

 

2. 刷新当前页面

window.location.reload();

相关文章:

  • 2022-02-27
  • 2021-12-15
  • 2021-05-21
  • 2021-05-17
  • 2022-12-23
  • 2022-01-14
  • 2022-02-14
  • 2022-01-17
猜你喜欢
  • 2022-01-19
  • 2022-12-23
  • 2022-12-23
  • 2021-09-27
  • 2022-02-12
  • 2022-12-23
  • 2022-02-14
相关资源
相似解决方案