简体   繁体   English

向下滚动的动态HTML页面

[英]A dynamic HTML page scrolling down

I have a dynamic HTML page built with bootstrap, jqxGrid, calling some server side code to get data. 我有一个使用引导程序jqxGrid构建的动态HTML页面,它调用一些服务器端代码来获取数据。 After loading the data, jqxGrid populated, the page scrolls down. 加载数据后,将填充jqxGrid,页面向下滚动。

Getting the code from a different developer, not sure where/what caused the page scrolling down. 从其他开发人员处获取代码,不确定导致页面向下滚动的位置/原因。

I searched keyword "scroll" and did not find anything. 我搜索了关键字“ scroll”,但没有找到任何东西。

My question is a general question: what kind of JS code/css could lead the page to scroll down? 我的问题是一个普遍的问题:什么样的JS代码/ css可以导致页面向下滚动?

Thanks! 谢谢!

$("html, body").animate({scrollTop: "2500"}, 1000); //smooth scrolling 2500px down

当然,您可以通过编写以下内容滚动到html中的任何元素:

scrollTop: $(element).offset().top

Look for something like: 寻找类似的东西:

<a href="#anchor">Link Text</a>

in your html code and quite possibly some javascript that is accessing it and causing the scroll. 在您的HTML代码中,很有可能正在访问它并导致滚动的一些JavaScript。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM