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.
我想在刷新页面时记住我的光标位置。但是每当我刷新页面时,光标可以在页面顶部。我该如何解决它。感谢任何帮助。谢谢
你可以使用ajax。获取光标坐标(尽管我认为您在滚动条位置之后)并将它们发布到您的页面(通过 $_GET)。然后将它们发回并使用 javascript 将页面定位到您想要的任何位置。
获取滚动条信息, 设置滚动条