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();

以上就是【两个Javascript小tip资料】的全部内容了,欢迎留言评论进行交流!

赞(0) 踩(0)

与本文相关的软件

发表我的评论

最新评论

  1. 暂无评论