1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > js动态移动滚动条至底部示例代码【javascript】

js动态移动滚动条至底部示例代码【javascript】

时间:2022-02-22 07:25:43

相关推荐

js动态移动滚动条至底部示例代码【javascript】

web前端|js教程

动态移动,滚动条,底部

web前端-js教程

收费算命源码,ubuntu t480,tomcat怎么实现线程池,网络爬虫抽奖,php多次判断,浑南区推广抖音seo优化程序lzw

var currentPosition,timer;

function GoBottom(){

timer=setInterval("runToBottom()",50);

}

function runToBottom(){

currentPosition=document.documentElement.scrollTop || document.body.scrollTop;

currentPosition+=30;

if(currentPosition<document.body.scrollHeight && (document.body.clientHeight + document.body.scrollTop < document.body.scrollHeight))

{

//window.scrollTo(0,currentPosition);

//alert(document.documentElement.clientHeight + " " + document.documentElement.scrollTop + " " + document.documentElement.scrollHeight + "#" +document.body.clientHeight + " " + document.body.scrollTop + " " + document.body.scrollHeight);

document.body.scrollTop = currentPosition;

}

else

{

document.body.scrollTop = document.body.scrollHeight;

clearInterval(timer);

}

}

手机文章系统源码,vscode添加筛选器,ubuntu 设置远程,tomcat 打开空白,sqlite数据库 分组,jquery 插件开发模板,淘宝前端开发框架兼容手机电脑,爬虫上市公司财报,mvc 实例 php,佛山seo排名公司,flash动画下载网站免费,php网页在线聊天,discuz手机模板不清晰lzw

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。