Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
怎么可能让我的实际文档滚动,然后在某些事件之后设置它?我想知道我的页面是如何滚动的,并且在某些事件之后回到这个位置。谢谢
您可以使用$(window).scrollTop()来获取当前的垂直滚动并设置它$(window).scrollTop(value)。
$(window).scrollTop()
$(window).scrollTop(value)