简体   繁体   中英

maintaining same size on submit

I'm making a webpage which has a few links on the side, which when I click on it redirects me to this particular .php file. On every php file I have the same header and footer. But the problem is, when I click on a link or on a submit, I'm automaticly at the top again, even though I'm scrolled down.

What I want is, I want to be able to click anything, but still maintain the position I am on the website, is that possible?

Hmm not really. You could try to fake this behavior by using anchors within the page: How to go a DIV in other file using HTML anchor tag

You can store a cookie on the client side which remembers the vertical offset of your page and then at each reload, check that cookie on the client side and set the vertical offset accordingly. You can do this with jQuery quite easy.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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