用 ajax 和 hash 实现页面的访问。
比如访问 url.com/post#001
会显示对应的 #001 页面。点击进入 url.com/post#002
后显示 #002 对应的页面。
当问从 #002 点击浏览器的后退回到 #001 时,页面显示的还是 #002 的内容。
有没有办法让回退到 #001 时显示 #001 的页面呢?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
hashchange, pjax