简体   繁体   English

在Chrome浏览器中第二次未加载页面

[英]Not loading a page 2nd time in Chrome browser

In page_1 , there is a table containing many rows with hyperlinks in every one of the rows, when clicking any of them it goes to page_2 and suppose I scroll down to row number 100 which is almost at the bottom of the page_1 . page_1中 ,有一个表,其中包含许多行,每一行中都有超链接, 单击任何行时,它会转到page_2,并假设我向下滚动到第100行,该行几乎位于page_1的底部。

In page_2 , when I am clicking the back button of the Chrome browser , it gets back to page_1 but it is loading the table again and remains at the top. page_2中 ,当我单击Chrome浏览器的“ 后退”按钮时,它返回到page_1,但是它将再次加载该表并保持在顶部。 But I want it not to load and remain at the bottom of the table row 100 in page_1 . 但我希望它不要加载并保留在page_1中表行100的底部。

In Mozilla FireFox , my condition is fulfilled automatically but not in case of Google Chrome browser . Mozilla FireFox中 ,我的条件可以自动满足,但对于Google Chrome浏览器则不能

is this achievable using javascript/jquery ? 使用javascript / jquery可以实现吗? I am going through some solves but still not working yet! 我正在解决一些问题,但仍无法解决!

When you move to page_2 store the scroll location in some global variable with the below code. 当您移至page_2时,使用以下代码将滚动位置存储在某个全局变量中。

var scroll = document.documentElement.scrollTop; var scroll = document.documentElement.scrollTop;

Now when u come back to page_1 set the scrollTop again. 现在,当您回到page_1时,再次设置scrollTop。

document.documentElement.scrollTop = scroll; document.documentElement.scrollTop =滚动;

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

相关问题 如何在.load()之后第二次预加载div - how to prevend loading div for 2nd time after .load() ReactJS Components不加载,除非您第二次重新加载该站点 - ReactJS Components Not loading unless you reload the site for the 2nd time 在第一页上通过控制台浏览器触发按钮后,在第二页上操作数据 - Manipulating Data on 2nd page after button was triggered on 1st page via Console Browser 当我单击浏览器中第一页中的按钮时,如何重新加载第二页? - How to reload 2nd page when i click the button in 1st page in browser? Chrome V8 错误? 功能 被第二次调用后表现不同 - Chrome V8 Bug? Function Acting different after being called a 2nd time 第二次按ENTER后,jQuery画廊在Chrome中工作,怎么了? - Jquery gallery working in Chrome after pressing ENTER a 2nd time, whats wrong? 如果第二次只是相同的视频,如何防止相同的视频加载两次 - how to prevent same video loading twice if its just the same video a 2nd time 从属下拉列表不起作用,第二个下拉列表未加载 - Dependent dropdowns not working, 2nd dropdown not loading 与Chrome和Safari浏览器相比,在Edge浏览器中加载GWT页面/项目所花费的时间更长 - Loading of GWT page/project taking more time in Edge browser than Chrome and Safari browsers 打印页面:仅在第二页上显示内容? - Printing a page: Content only on 2nd Page?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM