Home > Backend Development > PHP Tutorial > 天涯论坛回帖机制解决方案

天涯论坛回帖机制解决方案

WBOY
Release: 2016-06-13 13:27:44
Original
941 people have browsed it

天涯论坛回帖机制
天涯论坛刚刚回帖后,会显示在你停留的那一页的末尾,你停留在第一页就会显示在第一页的末尾,但是刷新之后,刚回的帖子就回到末页了,
求教,这是用了啥方法

------解决方案--------------------
显示在末端。是用了锚点。CSDN也是如此。
刷新的话,应该要重新计算总页数,然后回到末页。php实现起来并不难。
------解决方案--------------------
php分页+html锚点
------解决方案--------------------
提交帖子就是AJAX提交,然后服务器返回当前帖子有多少页,然后就跳到当前页末尾的锚点,过几秒JS再把你跳转到view_topic.php?page=AJAX告诉你的页码。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template