// 数据自动滚动事件BEGIN

var botTimer = null;  // 定时器对象

var top = document.getElementById(innerId).style.marginTop.replace('px', '') ? document.getElementById(innerId).style.marginTop.replace('px', '') : 0;
botTimer = setInterval(function () {
if (Math.abs(top) >= (listHei - winHei)) {
//请求最新数据
//listHei = loadNewData(innerId);
if (Math.abs(top) >= (listHei - winHei)) {
// 如果没有再多数据,就清空定时器
clearInterval(botTimer);
document.getElementById(innerId).style.marginTop = 0;
// 再次调函数
scrollCore(outerId, innerId);
} else {
top -= 1; 
document.getElementById(innerId).style.marginTop = top + 'px';//px
}
} else {
top -= 1;
document.getElementById(innerId).style.marginTop = top + 'px';//px
}
}, 200);
}
// END

相关文章:

  • 2022-12-23
  • 2021-07-22
  • 2021-09-03
  • 2021-11-27
  • 2021-11-27
  • 2022-02-24
  • 2021-11-27
猜你喜欢
  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-22
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
相关资源
相似解决方案