jquery自动刷新而不闪烁

<script type="text/javascript">
window.onload = setupRefresh;

function setupRefresh() {
  setTimeout("refreshPage();",1000);
}
function refreshPage() {
   window.location = location.href;
}

页面现在每秒重新加载唯一的问题,它闪烁如何解决这个问题

解决方法

您可以使用div和.get与jquery从您网站上的其他页面获取您的数据。

可以使用setTimeOut(function,time)

$(function() {
    startRefresh();
});

function startRefresh() {
    setTimeout(startRefresh,1000);
    $.get('pagelink.PHP',function(data) {
        $('#content_div_id').html(data);    
    });
}

相关文章

页面搜索关键词突出 // 页面搜索关键词突出 $(function () {...
jQuery实时显示日期、时间 html: &lt;span id=&quot...
jQuery 添加水印 &lt;script src=&quot;../../../.....
中文:Sys.WebForms.PageRequestManagerParserErrorExceptio...
1. 用Response.Write方法 代码如下: Response.Write(&q...
Jquery实现按钮点击遮罩加载,处理完后恢复 思路: 1.点击按...